> I have a bunch of dates in the form: MM-DD- in an array and I want to
> sort them and display them in descending order. I have tried the usort()
> function below and it's not working. Can anyone help me out here?
Your sorting function uses strtotime, which doesn't recognise data in the
MM-
an easy way, but might not work in your case is to use sort()
if instead of storing the dates like 12-04-2003, could you prehaps store
them as
2003-04-03
year-month-day
and then you could use
$datearray = sort($datearray, SORT_STRING);
would this work for you?
--
Luke
"Matt Palermo" <[EMAIL
2 matches
Mail list logo