I tested the foreach with an echo so it works but now I'm getting strange results with 'unset'. One thing I tried shut down my Appache server another just adds "</myquotes>" to the end of the .xml which is better than nothing but not good enough.
the php:
$dcount = array();
$dcount = $_POST["dcount"];
$dfile = '../sidebar.xml';
$dxml = simplexml_load_file($dfile);
foreach($dxml->children() as $dkid)
{
if(in_array($dkid->id, $dcount))
{
unset($dxml->myquotes->$dcount);
//usenet($dxml->myquotes->$dcount); - This one adds "</myquotes> to existing file
//unset($dxml->$dkid->id); - This one shuts off my Appache server
//$dxml = $dxml->asXML();
$dxml = $dxml->asXML($dfile);
}
}
the xml structure
<sidebar>
<myquotes>
<id>10001</id>
<thequote>It's elementry my dear Watson...</thequote>
<reference>Sherlock Holmes</reference>
</myquotes>
</sidebar>

