I have an xml that looks something like this:
<gallery server="5">
<image path="http://i.imgur.com/8n5MB.jpg"/>
<image path="http://i.imgur.com/TIXL2.jpg"/>
</gallery>
I'm trying to get the images to display in one page using PHP. This is what I have:
$xml = simplexml_load_file('./images.xml');
echo $xml->getName() . "<br />";
foreach($xml->children() as $child)
{
echo $child->getName() . "<br />";
}
My problem is that this only outputs the following
gallery
image
image
image
I can't find any information on how to read the information of the tag itself, any pointers? Thanks!