Re: sorting multi array
| From: | Richard Lynch | Date: | Wed, 25 Apr 2007 23:24:17 +0000 |
| Subject: | Re: sorting multi array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253809@lists.php.net to get a copy of this message | ||
Search the archives for "multisort array" and you should find this
thread a few thousand times...
On Tue, April 24, 2007 6:58 pm, Jon Bennett wrote:
> hi,
>
> I have the following array, which I need to sort by quantity...
>
> Array
> (
> [2408] => Array
> (
> [name] => Havaianas Top Pink Crystal
> [size] => 5 (37/38)
> [quantity] => 4
> )
>
> [3388] => Array
> (
> [name] => Havaianas Brazil Silver
> [size] => 6/7 (39/40)
> [quantity] => 6
> )
>
> [2666] => Array
> (
> [name] => Havaianas Brasil Black
> [size] => 8/9 (41/42)
> [quantity] => 1
> )
>
> [3210] => Array
> (
> [name] => Havaianas Margaridas Yellow
> [size] => 5 (37/38)
> [quantity] => 1
> )
>
> [2552] => Array
> (
> [name] => Havaianas Flash White
> [size] => 5 (37/38)
> [quantity] => 1
> )
> )
>
> I need to keep the indexes if poss.
>
> Many thanks,
>
> jon
>
> --
>
>
> jon bennett
> t: +44 (0) 1225 341 039 w: http://www.jben.net/
> iChat (AIM): jbendotnet Skype: jon-bennett
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?