Hi:
I’m looking to sort an array of dates in format 10-10-2003 using usort after they have been converted using mktime.
mktime will only work on 1 string… how can I convert the entire array and then process through my usort? I have so far:
[php]$dates = array(‘10-10-2003’, ‘2-17-2002’, ‘2-16-2003’, ‘1-01-2005’, ‘10-10-2004’);
mktime($dates);
function cmp($a, $b){
return strcmp($b[‘db’], $a[‘db’]);
}
usort($dates, “cmp”);
print_r($dates);
[/php]