RE: [PHP] Limiting an array to unique values

From: Date: Tue, 06 Apr 2004 14:34:23 +0000
Subject: RE: [PHP] Limiting an array to unique values
Groups: php.general 
Request: Send a blank email to php-general+get-182476@lists.php.net to get a copy of this message
Thanks... Exactly what I needed. alex hogan > -----Original Message----- > From: joel boonstra [mailto:jboonstra@gospelcom.net] > Sent: Tuesday, April 06, 2004 9:30 AM > To: PHP General list > Subject: Re: [PHP] Limiting an array to unique values > > On Tue, Apr 06, 2004 at 09:27:31AM -0500, Alex Hogan wrote: > > Hi All, > > > > I have an array that I am using as a parameter for a query in a where > > clause. > > > > The array has values that are like this. > > > > Item 1 > > Item 2 > > Item 3 > > Item 1 > > Item 3 > > Item 3 > > Item 1 > > > > What I need to have is unique values only. > > > > Item 1 > > Item 2 > > Item 3 > > > > How can I sort out the redundant values in that array? > > PHP's 'array_unique' function should help: > > http://php.net/array_unique > > -- > [ joel boonstra | gospelcom.net ] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php ****************************************************************** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. ******************************************************************

« previous php.general (#182476) next »