I am fetching records from mysql database through while loop.
$sql=mysql_query("SELECT * FROM animate ORDER BY RAND() LIMIT 10") or die("query Field");
while($row=mysql_fetch_array($sql)){
$row['code'];
}
output is xyacefg.
Now I want to break this output into an array I want to place each letter into separate index of array like
array('x','y','a','c','e','f','g');
I have used explode
$array = explode(' ', $row['code']);
but it didnot work. now the final code is .
$sql=mysql_query("SELECT * FROM animate ORDER BY RAND() LIMIT 10") or die("query Field");
while($row=mysql_fetch_array($sql)){
$row['code'];
}
$array = explode(' ', $row['code']);