Well, actually I have gotton this far:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<players>
<player id="1">4</player>
<player id="2">3</player>
</players>
<chats>
<chat playerid="2">Some chat here...</chat>
<chat playerid="1">skfgjh kjgh fdskgjhdf kgjhdf gkjd gkjdfhg dkfjhg</chat>
</chats>
</data>
I can get the first record, but only the first with this code:
PHP Code:
$userXML = simplexml_load_file('xml_chats/0^0.xml') or die ("error");
foreach($userXML->chats as $nchats){
echo $nchats->chat.'<br>';
}
I get "Some chat here..."?
Why???
Bookmarks