Re: sorting array after array_count_values

From: Date: Tue, 15 Aug 2006 22:18:17 +0000
Subject: Re: sorting array after array_count_values
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-240735@lists.php.net to get a copy of this message
On Tue, August 15, 2006 9:01 am, afan@afan.net wrote: > I have an array of products $products > $products = array_count_values($products); > now I have an array where $key is product number and $value is how > many > times I have such a product in the array. > I want to sort this new array that product with the most "duplicates" > are > on the first place, but what ever I use (rsort, krsort,..) i loose > product > numbers (key). http://php.net/asort -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#240735) next »