RE: Multi-Sort -- how to do this?

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

 



From: Ashley Sheridan
> On Wed, 2009-06-17 at 19:27 -0400, tedd wrote:
>> At 10:54 PM +0100 6/17/09, Ashley Sheridan wrote:
>> >I'd probably go with some sort of custom bubble sorting function.
Base
>> >the sorting on your $d array, and then update the other arrays as
>> >necessary. Should be OK if they all have the same index, like in
your
>> >example. If you were using keys, could you maybe join all the arrays
>> >using some sort of serialisation, sort, then unserialise into the
>> >separate arrays?
>> >
>> Ash:
>> 
>> You missed the point. I could use the built-in sort (i.e., sort() ) 
>> and sort the $d array. However, I would like the indexes of the other

>> arrays to match the new sort.
>> 
> 
> I think I might need a for-instance here, as you lost me!
> 

He is emulating a four column table using four arrays. He wants to sort
the table on one of the columns.

Bob McConnell

-- 
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