3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <Property> <images> <image number="1"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627783.jpg </image> <image number="2"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627794.jpg</image> </image> <image number="3"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627792.jpg </image> </images> </Property> XML; $xml = simplexml_load_string($xmlstr); //var_dump($xmlstr); foreach ($xml->images->image as $im) { // create an array $images with number as index and url as value var_dump ($im); } ?>

preferences:
38.63 ms | 402 KiB | 5 Q