To access the [@attributes] in a SimpleXML object use the following code:
$xml = simplexml_load_string($curl_result, 'SimpleXMLElement', LIBXML_NOCDATA);
foreach ($xml->item as $f)
{
echo $f->attributes()->id . '<br />';
}
If you found this article useful and would like to see more like it this please consider making a donation.