I am sure this has been answered somewhere before but I couldn’t find the answer to this exact case…
I know I can use the usort function, but can’t figure out the logic to do what I want eventhough it’s relatively simple
I have a dynamic area being generated as such:
$details[$pageYear][$pageMonth][] = array(
"id" => $page['id'],
"title" => $page['title']
);
I want the array $details to be eventually sorted descending by year, then by month
the month value is string (january, february, march, etc… and not numeric), which seems to be my main issue (how to sort the month ‘strings’ by actual order and not letter order)
any help would be greatly appreciated
sorry if this turns out to be a duplicate
can you use uasort whit this callback?