PHP: SimpleXML and Arrays
- by acemasta
When I run this code:
foreach($xml->movie as $movie) { if(isset($movie->photos)) { foreach ($movie->photos as $photo) { echo $photo." "; } echo "<hr/>"; } }
I get nice output of the actual data, e.g. a row looks like
06397001.jpg 06397002.jpg 06397003.jpg 06397004.jpg 06397005.jpg
But when I throw it in an array, it…