At 3:33 PM +0100 8/18/08, Ashley Sheridan wrote:
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
Ash:
I'm aware of array_unique() and have used it -- but I must have
looked past array_count_values() ten times and didn't recognize it
for what it was.
Thanks,
tedd
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
-------
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