10-12-2007, 08:29 PM
|
#7 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
HAH!
I solved it! :D:D
PHP Code:
$xmlstring = new SimpleXMLElement($xml, null, true); foreach($xmlstring as $pics => $pic) { if($pic['id'] == $id) { echo $pic['info']; } }
Code:
<?xml version="1.0" encoding="utf-8"?>
<pics>
<pic id="1" info="Testing1" />
<pic id="2" info="Testing2" />
<pic id="3" info="Testing3" />
<pic id="4" info="Testing4" />
</pics>
Thanks so much!! :D
|
|
|
|