Split strings into character by character and store it in array using PHP

by Nirmala 2009-09-04 12:57:40

Use str_split function to split strings into character by character and store it in an array.
Example:
$str="Hai";
$str1=str_split($str);

Output:
$str1[0]="H";
$str1[1]="a";
$str1[2]="i";

Tagged in:

1471
like
1
dislike
0
mail
flag

You must LOGIN to add comments