hi guys,

thanks for the replies! yes Melanie, you were correct the last example (i had an old version of the manual). seemed to do the trick =)

Thanks to john as well for the reply.

Angelo

Melanie Maddix wrote:

[snip]
So they way I want to sort these rows is by total, totalPaid, totalUnpaid all descending.
Output should be:
partnerID  | partnerName | total  | totalPaid  | totalUnpaid
5                  berty               30    12                18
7 sarah 19 12 7 1 marc 12 5 7



I have looked at the manual and found uasort and array_multisort, but these don't seem to be appropriate unless Im missing something but the examples found are very vague.
If anyone can help that would be great,

Thanks in advance
Angelo
[/snip]


Hi Angelo,

Take a look at Example 3 under array_multisort, the one that sorts by
volume and edition.
You first build arrays of the columns you want to sort by, then pass
them as an argument to array_multisort, along with your original array.

Melanie


--
------------------------------------------------------------------------
Angelo Zanetti
Systems developer
------------------------------------------------------------------------

*Telephone:* +27 (021) 469 1052
*Mobile:*       +27 (0) 72 441 3355
*Fax:*            +27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to