To “sort” dates in php, see here: http://stackoverflow.com/questions/2832467/php-how-can-i-check-if-the-current-date-time-is-past-a-set-date-time

Use strtotime (http://php.net/manual/en/function.strtotime.php) to convert 06-07-2012 to a unix time format that php can sort.

Update: difference between mm-dd and dd-mm: http://stackoverflow.com/questions/8554414/strtotime-not-working-with-mm-dd-yyyy

Advertisements