Sort XML elements by Date Element?
Hello I am using a DOMDocument to retrieve information from an XML file. The information is setup like so:
Code:
<person>
<name>John Smith</name>
<born>March 15th, 1987</born>
</person>
<person>
<name>Eric Lee</name>
<born>July 18th, 1949</born>
</person>
<person>
<name>Michael Arnold</name>
<born>April 2nd, 2003</born>
</person>
At the moment I am displaying just the names of each of these groups on the page. How would I display the names of each of these people according to when they were born? (Youngest to oldest or oldest to youngest)
I believe it has something to do with strtotime() and sort() but can someone explain or give an example?
Re: Sort XML elements by Date Element?
Does anyone have an idea/suggestion?