I'm trying to edit some xml data. After this I want to save the data to file.
The problem is that the edited data isn't saved by simplexml but the node has changed.
$spieler = $xml->xpath("/planer/spieltag[@datum='" .$_GET['date']. "']/spielerliste/spieler");
for ( $i = 1; $i < 13; $i++ ){
if (!empty($_POST['spieler' .$i ])){
$spieler[$i-1] = $_POST['spieler' .$i];
}
}
var_dump($spieler);
$xml->asXML("data.xml");
var_dump() shows the new data, but asXML() doesn't.