sorting an array in date order
Moderator: General Moderators
-
Birmingham
- Forum Newbie
- Posts: 1
- Joined: Mon Oct 08, 2007 8:16 am
- Location: Birmingham, England, UK
sorting an array in date order
hi, can anyone give me a really simple example of sorting an array in date order please? it's strangely an issue i've been struggling with for some time now....
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
RobertPaul
- Forum Contributor
- Posts: 122
- Joined: Sun Sep 18, 2005 8:54 pm
- Location: OCNY
If your dates aren't in YYYY-MM-DD format (which I'm pretty sure is an ISO standard rather than a military standard
) then you'll probably want to use usort() with a callback function that decomposes the date string, etc...