Re: How to sort a two-D ARRAY
| From: | Isataev Volodymir | Date: | Fri, 26 Jun 2009 08:12:47 +0000 |
| Subject: | Re: How to sort a two-D ARRAY | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294636@lists.php.net to get a copy of this message | ||
On Thursday 25 June 2009 21:38:24 Ashley Sheridan wrote:
> On Wed, 2009-06-24 at 15:23 -0700, salmarayan wrote:
> > Can Anyone tell me how to sort two D Array in Descending Order
> > for example like this one based on the gain
> > Array ( [0] => Array ( [company_name] =>X [gain] => 0.2 ) [1] => Array (
> > [company_name] => y[gain] => 0.34 )[2]1] => Array ( [company_name]
> > =>z[gain] => 2 ) )
> > Thanks in advance
> > --
> > View this message in context:
> >
> > http://www.nabble.com/How-to-sort-a-two-D-ARRAY-tp24193925p24193925.html
> > Sent from the PHP - General mailing list archive at Nabble.com.
>
> stw http://us3.php.net/manual/en/function.array-multisort.php
>
>
>
> Thanks
> Ash
> www.ashleysheridan.co.uk
in this case salmarayan whanted to sotr by one specific feeld of sub array.
http://us3.php.net/manual/en/function.uasort.php
should be used.
--
Best regards,
Isia [isj^] (Isataev Vladimir)
ICQ: 305832316
CEL: +38 (067) 58-68-148