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
RE: [PHP] Limiting an array to unique values
Thanks... Exactly what I needed. alex hogan -Original Message- From: joel boonstra [mailto:[EMAIL PROTECTED] 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. **
Re: [PHP] Limiting an array to unique values
From: Alex Hogan [EMAIL PROTECTED] 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? array_unique(). Imagine that. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Limiting an array to unique values
I guess I deserved that one... alex hogan -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 9:40 AM To: Alex Hogan; PHP General list Subject: Re: [PHP] Limiting an array to unique values From: Alex Hogan [EMAIL PROTECTED] 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? array_unique(). Imagine that. :) ---John Holmes... ** 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. **