On 11 Apr 2012, at 16:26, Floyd Resler wrote:
> I need to sort the following array:
> {
> [Smith, Bob]=>array(137.5,125.5),
> [Jones, Robert]=>array(132.7,128.2)
> }
>
> The array needs to be sorted by the first number (i.e. 137.5) and then the second in descending order. I looked at array_multisort but couldn't figure out how to make work for my needs.
Use a custom sorting function, then you can sort any way you want: http://php.net/usort
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP Home]
[Apache Users]
[PHP on Windows]
[Kernel Newbies]
[PHP Install]
[PHP Classes]
[Pear]
[Postgresql]
[Postgresql PHP]
[PHP on Windows]
[Find Someone]
[PHP Database Programming]
[PHP SOAP]