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
album gallery1 gallery2 gallery2 . . . galleryN /album
This is how it is right now when I add childs with the basic code
$galleryElement = $sxe->addChild("gallery");
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.
example:
album gallery3 gallery2 gallery1
/album
Any one knows some trick here