I have this string:
$string = "123456789"
It should become an array:
Array ( [0] => 123 ) Array ( [1] => 456 ) Array ( [2] => 789 )
but I get:
Array ( [0] => 123 ) Array ( [0] => 456 ) Array ( [0] => 789 )
I use loop to get this string:
for ($i=0; $i<$num; $i++)
{
$string = $tree['a']['b'][$i]['c'];
}
Next I use explode function to get an array. Why I got the array with only one index - zero? What I should do to get:
Array ( [0] => 123 ) Array ( [1] => 456 ) Array ( [2] => 789 ).
Please help me understand this.
$tree
? What is ` $string` ? – hakre Apr 24 '12 at 6:44