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 Quote Link to comment Share on other sites More sharing options...
optikalefx Posted July 9, 2010 Share Posted July 9, 2010 $url = $bannerdata[1]; Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.