[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: Re: [PHP] Sort a multi-dimensional array on a certain key followed by
From: Virgilio Quilario <virgilio.quilario () gmail ! com>
Date: 2009-03-28 17:09:57
Message-ID: 77f7cbac0903281009h65cd968as2779f68afd05bad2 () mail ! gmail ! com
[Download RAW message or body]
> Ok so, I have an array
>
> [0(index)][1st key][2nd key]
>
> Basically I don't care about the index. As a matter of fact I'd prefer it
> reset to still be in order afterwards.
>
> However, I need to sort the 1st key and keep correlation w the second key.
> Then sort on the second key.
>
> I have video volumes and scenes like
>
> [0][110][1]
> [1][110][3]
> [2][110][2]
> [3][110][4]
>
> Any help would be much appreciated.
>
looks like a job for array_multisort() function
http://php.net/array_multisort
virgil
http://www.jampmark.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic