add xml node at the first of the it's parent node

Cluddyelalo

New Member
\[code\]<?xml version="1.0" encoding="utf-8"?><users> <user> <firstname>Mark</firstname> <surname>Zhu</surname> </user></users>\[/code\]this is the user node I want to add in the front of the existing one\[code\] <user><firstname>Andy</firstname><surname>Li</surname></user>\[/code\]The SimpleXMLElement::addChild can add the in the back of the existing one, Is there anybody know how to add in the front?
 
Back
Top