I want to remove tasks that are older than today, but I can\'t quite figure out how to remove elements from XML file yet.
$xml_file = simplexml_load_file(\'file.
Using simplexml: --> live demo @ http://codepad.viper-7.com/Jl16Oh
simplexml
$xml = simplexml_load_string($x); // XML is in $x $today = date("m/d/Y"); $max = $xml->task->count()-1; for ($i = $max; $i >=0; $i--) { if ($xml->task[$i]->date < $today) unset($xml->task[$i]); }