array_unique() removes duplicate values from an array. Is there an opposite function or way of keeping all values in a single dimentional array that are duplicates and removing all that are duplicates?
for example if I have an array: array( [0] => 'dog', [1] => 'cat', [2] => 'rabbit', [3] => 'cat') how do I make it just have array ( [0] => 'cat' )? i want to drop the non-duplicates and trim the array to only have one of the duplicates? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php