I have an xml object like this
$obj = simplexml_load_file('/path/to/file.xml');
i also create one
$createdObj = new SimpleXMLElement("<testing></testing>");
What i want is tho put the $obj into the $createdObj
So i get
<testing>
<fromobj></fromobj>
</testing>
Try:
ref: http://www.php.net/manual/simplexmlelement.addchild.php#105158
DOM-example (supporting any number of child nodes):