Re: Some help with SimpleXML :`(
| From: | Matthew Croud | Date: | Fri, 04 Sep 2009 08:23:45 +0000 |
| Subject: | Re: Some help with SimpleXML :`( | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297663@lists.php.net to get a copy of this message | ||
Well, you guys are awesome.
So the script below doesn't cause any errors (nice), however it doesn't save the newly added child to the xml file (items.xml):
$xml = simplexml_load_file("items.xml");
$item = $xml->addChild('item');
$item->addChild('name', $name);
$item->addChild('desc', $desc);
$item->addChild('size', $size);
$item->addChild('price', $price);
I thought it would ? would i need to "write" using fwrite ?