Simplified I've got an array looking like this:
myArray
(
[0] => myArray
(
[0] => Peter
[1] => 45
)
[1] => myArray
(
[0] => Marco
[1] => 46
)
[2] => myArray
(
[0] => Michel
[1] => 45
)
)
I want a final sorted output like this:
Michel 45
Peter 45
Marco 46
How do I do this with php? I'm really struggling with the different sort and array_multisort functions in PHP.
I don't find any help on this anywhere else, it seems like the most common thing to do. Sorting by more than one criteria. First by lowest score and secondly if scores are equal, sort by name ascending.
Would so much appreciate help if available, am on a tight deadline (aren't we all
.
Thanks,
/ Jess
myArray
(
[0] => myArray
(
[0] => Peter
[1] => 45
)
[1] => myArray
(
[0] => Marco
[1] => 46
)
[2] => myArray
(
[0] => Michel
[1] => 45
)
)
I want a final sorted output like this:
Michel 45
Peter 45
Marco 46
How do I do this with php? I'm really struggling with the different sort and array_multisort functions in PHP.
I don't find any help on this anywhere else, it seems like the most common thing to do. Sorting by more than one criteria. First by lowest score and secondly if scores are equal, sort by name ascending.
Would so much appreciate help if available, am on a tight deadline (aren't we all
Thanks,
/ Jess