Does anyone know of an arry sort that'll let me sort an associative array on multiple keys at multiple levels? I have an array of events, and each event (below) contains multiple keys and sub-arrays. I need to sort the entire event array based on the sorts shown below.
I imagine there are some pre-written routines or classes that'd let me do something like this, but I don't seem to be able to turn anything up.
I imagine there are some pre-written routines or classes that'd let me do something like this, but I don't seem to be able to turn anything up.
Code:
EVENT Array
(
[84815] => Array [b](84815 is event ID)[/b]
(
[date_time] => 2006-02-22 19:30:00 [b]<- FOURTH SORT ASC[/b]
[date] => 2006-02-22
[time] => 19:30:00
[status] => 6
[status_text] => Complete
[away] => Array
(
[id] => 716
[name] => Molina
[score] => 3
[district_id] => 172
[district_name] => 9-5A
[district_dist] => 9
[district_class] => 5A
)
[home] => Array
(
[id] => 47
[name] => W.T. White
[score] => 4
[district_id] => 172
[district_name] => 9-5A
[district_dist] => 9 [b]<- SECOND SORT - DESC[/b]
[district_class] => 5A [b]<- THIRD SORT - ASC[/b]
)
[site] => 1824
[site_name] => Forester
[winner] =>
[type] => 10 [b]<- FIRST SORT - CUSTOM (10,4,27,etc.)[/b]
[type_description] => District
)