How to split an array to parts by comma or special character (string to array) ?

Use explode function for this job:$names = 'John,Margaret,Thomas'; $namesArray = explode( ',' , $names ); echo $namesArray[0]; echo $namesArray[1]; echo $namesArray[2];You can also use a character sequence to split string like a "splitplace"

Comments

Popular posts from this blog

How to construct a B+ tree with example

How to show only month and year fields in android Date-picker?

Visitor Counter Script Using PHP