Re: Number of duplicates in an array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux