Re: opposite of array_unique()?

From: Date: Wed, 04 Aug 2004 20:08:16 +0000
Subject: Re: opposite of array_unique()?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192742@lists.php.net to get a copy of this message
* Thus wrote Adam Williams: > 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? If you're pulling this data from a sql table, then you're better off having the database server do this work for you. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.general (#192742) next »