Page 1 of 1

array_multisort question, for those that know it...

Posted: Thu Apr 20, 2006 10:27 pm
by robster
Hi all,

How can I use array_multisort?

I went through the database and and got a bunch of totals and stuck them in an array called $trans_draw_multi_array[] (great name no? :)) and it contains 0,1,2,3 as the key identifiers...

If I want to sort the array by $trans_draw_multi_array[3] ASC. Can I use array_multisort? I had a play and got some strange results (see code below). I'm wondering if anyone can shed some light on the situation?

Thanks again, all advice appreciated...

Rob

Code: Select all

array_multisort($trans_draw_multi_array[3], SORT_ASC);