Forum Moderators: coopster
Array
(
[0] => Array
(
[score] => 50
[name] => Widget
)[1] => Array
(
[score] => 550
[name] => Gadget
)
)
Is it possible to sort this array via the value of [score]?
I've got as far as trying to use both array_multisort and usort, without really understanding how they work ;)
Thanks for any pointers :)
usort($ary,'scoreAsc');
The function will receive, for example, $ary[0] as $a and $ary[1] as $b.
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
And thanks for the links, coop :)
[edited by: Receptional_Andy at 2:44 pm (utc) on April 25, 2009]