dezkit Posted September 2, 2010 Share Posted September 2, 2010 Hey guys I have the following code: $xml = new SimpleXMLElement( 'http://steamcommunity.com/profiles/76561197963859775?xml=1' , NULL, TRUE ); print_r($xml); The problem here is that it doesnt echo everything correctly... It doesn't show avatarFull for me impleXMLElement Object ( [steamID64] => 76561197961308838 [steamID] => SimpleXMLElement Object ( ) [onlineState] => in-game [stateMessage] => SimpleXMLElement Object ( ) [privacyState] => public [visibilityState] => 3 [avatarIcon] => SimpleXMLElement Object ( ) [avatarMedium] => SimpleXMLElement Object ( ) [avatarFull] => SimpleXMLElement Object ( ) That's what it shows, the avatarFull and a couple others are empty. How do I fix this? Thank you Link to comment https://forums.phpfreaks.com/topic/212327-problem-using-simplexml/ Share on other sites More sharing options...
Adam Posted September 2, 2010 Share Posted September 2, 2010 Have you tried echoing them out..? echo $xml->avatarMedium; I think the reason you're unable to see them with print_r() is because they're classed as SimpleXMLElement objects too; which print_r() doesn't seem to be able to recursively print through. Link to comment https://forums.phpfreaks.com/topic/212327-problem-using-simplexml/#findComment-1106339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.