[EDIT: This may be a duplicate question...but I spent over 30 minutes looking for the answer to this question and did not find on stackoverflow. I would argue my question is more specific]
A standard PHP string to explode to print_r:
<?php
$pizza = "piece1 piece2 piece3";
$pieces = explode(" ", $pizza);
print_r($pieces);
?>
Does anybody know the magic of making this output:
Array ( [0] => piece1 [1] => piece2 [2] => piece3)
Turn into this:
Array
(
[0] => piece1
[1] => piece2
[2] => piece3
)
Many thanks.