My knowledge in php isn't the most promising, so I would like to ask if anyone could help me out with this.
This is what I get back when running print_r($xml) where $xml = simplexml_load_file('http://api.test.org/xml/?lalala123);
SimpleXMLElement Object (
[apikey] => asd2defdf164asdseasd06535fasdf0a
[uid] => 1110333
[language] => en
[users] => SimpleXMLElement Object (
[user] => SimpleXMLElement Object (
[@attributes] => Array (
[uid] => 1110333
)
[name] => bull
[surname] => torres
[nick] => SimpleXMLElement Object ( )
[place] => SimpleXMLElement Object ( )
[img] => http://xx.xx/xx.jpg
[sex] => M
[birthday] => SimpleXMLElement Object ( )
[age] => SimpleXMLElement Object ( )
[adult] => 1
[type] => User_Default
[deleted] => SimpleXMLElement Object ( )
)
)
)
And Im trying to assign all of the info to different variables so that I can use them in my code.
So far I've work out a way to get apikey wich looks like this:
echo $xml->apikey;
But I cant find a way to get things like name, surname and so on.
Anyone knows a way to do that? Thanks in advance.