Re: ksort by value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 Sep 2012, at 22:55, John Taylor-Johnston <jt.johnston@xxxxxxxxxxxxxx> wrote:
> http://php.net/manual/en/array.sorting.php is pretty clear. But my problem is that sort ($freq) destroyed my key.

Did you actually read it? There's a table on that page that summarises exactly what each sorting function does, with a column for whether they "maintain key association."

In this case you want http://php.net/asort

-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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux