xcandiottix Posted July 9, 2010 Share Posted July 9, 2010 $xml = simplexml_load_file("http://www.site.com/users/".$userid.".xml"); $bannerdata = $xml->xpath("/User/settings/main_table/Banner"); print_r($bannerdata); Shows: Array ( [0] => SimpleXMLElement Object ( [0] => http://www.site.com/graphics/default/member_banner.gif ) ) But I don't want to show anything, I just want to put the URL into a variable... how can I extract the URL? like this: $url = "http://www.site.com/graphics/default/member_banner.gif" Thanks Link to comment https://forums.phpfreaks.com/topic/207211-echo-array-result/ Share on other sites More sharing options...
optikalefx Posted July 9, 2010 Share Posted July 9, 2010 $url = $bannerdata[1]; Link to comment https://forums.phpfreaks.com/topic/207211-echo-array-result/#findComment-1083377 Share on other sites More sharing options...
xcandiottix Posted July 9, 2010 Author Share Posted July 9, 2010 $bannerdata[0] actually. But YES this works, awesome... thanks Link to comment https://forums.phpfreaks.com/topic/207211-echo-array-result/#findComment-1083382 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.