noahssite Posted February 13, 2011 Share Posted February 13, 2011 Hello I am using a DOMDocument to retrieve information from an XML file. The information is setup like so: <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? Link to comment https://forums.phpfreaks.com/topic/227546-sort-xml-elements-by-date-element/ Share on other sites More sharing options...
noahssite Posted February 14, 2011 Author Share Posted February 14, 2011 Is there no solution for this? Link to comment https://forums.phpfreaks.com/topic/227546-sort-xml-elements-by-date-element/#findComment-1174283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.