I can't find an exact duplicate of this question, as my nodes are numerical keys.
I need to sort this xml by date - newest first:
[article] => Array
(
[0] => SimpleXMLElement Object
(
[value] => some value
[date] => 2012-08-13 18:54:09
)
[1] => SimpleXMLElement Object
(
[id] => some more value
[date] => 2012-08-09 10:24:06
)
[2] => SimpleXMLElement Object
(
[id] => another value
[date] => 2012-08-11 20:45:44
)
)
How can I best do that - possibly WITHOUT turning the XML into a PHP array and sorting it then.