title: SimpleXml PHP addchild before any child
body: <p>I know how to add child nodes with SimpleXml and PHP but i have a problem with the orders of those child elements. 
  Lets say i have this  xml structure </p>
  
  <p>album
      gallery1
      gallery2
      gallery2
     .
     .
     .
      galleryN
  /album</p>
  
  <p>This is how it is right now when I add childs with the basic code </p>
  
  <pre><code>$galleryElement = $sxe-&gt;addChild("gallery"); 
  </code></pre>
  
  <p>I want the order of child elements in this case to be on the opposite  the last gallery that i will add to be first child of Album. </p>
  
  <p>example: </p>
  
  <p>album 
      gallery3
      gallery2
      gallery1</p>
  
  <p>/album</p>
  
  <p>Any one knows some trick here </p>