>>730
foreachで出来た方いたら教えてください。


$xml = new SimpleXMLElement('sample.xml', null, true);
for ( $i = 0 ; $i < count($xml->book);$i++) {
if ( $xml->book[$i]["id"] == " 00002") {
unset( $xml->book[$i] );
}
}
echo $xml->asXML();