The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Sorting a multidimensional array...
Well I'm back to programming... but I'm having trouble figuring this out... I want to do this with as LITTLE code as possible...
I have an array: Code:
$id $arr[$id]['w'] $arr[$id]['l'] Anduril 22 7 Derb 5 24 jimmychoi 25 3 Link-WI 7 21 Lokim 14 14 Mary-dono 5 25 Max 11 17 Metallix 6 24 MysticBill 25 2 Ora 21 8 Outlaw 18 9 Phil Bond 20 8 Pouncer 7 23 Tomi 13 14 ['w'] DESC, ['l'] ASC What that means, it should sort by the highest number of "wins" first, and then break ties by the lowest number of "losses". Does anyone know a simple way to do this? |
#2
|
||||
|
||||
<a href="http://de.php.net/manual/en/function.uasort.php" target="_blank">http://de.php.net/manual/en/function.uasort.php</a>
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|