array_multisort question, for those that know it...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
robster
Forum Contributor
Posts: 360
Joined: Wed Jul 16, 2003 8:28 am
Location: Sunshine Coast, Australia

array_multisort question, for those that know it...

Post 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);
Post Reply