Best way to remove duplicates from an array is to use the built in PHP
function array_unique().

As for counting the number of times each unique value occurs, use
array_count_values().


Ash
www.ashleysheridan.co.uk
--- Begin Message ---
Hi gang:

Anyone have a cool method of finding duplicate items in an array and the number of times they appear?

I'm doing it in a way that is probably less than optimum. I want to see how you guys solve it.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to