Very simple question im sure, i want to gather an image from an xml file:
Code: Select all
<story>
<publishdate>17 December 2010</publishdate>
<title>Story 3 title</title>
<content>Lets get this done <strong>2</strong></content>
<image><img src="images/demo.jpg" width="570" height="330" /></image>
</story>
Code: Select all
$xml = new SimpleXMLElement($xmlstr);
echo $xml->story[0]->title
echo $xml->story[0]->image
etc
etc
Any help would be great! Im a real novice, so sorry if this is painfully obvious.
Cheers,
Grant