Re: Deleting same values from an array

From: Date: Sat, 23 Aug 2003 00:04:06 +0000
Subject: Re: Deleting same values from an array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-160470@lists.php.net to get a copy of this message
Haha, thanks. I was looking at array functions earlier but didn't think to look at it since it seemed like something completely different. Oh well, thanks! Thanks, Stephen Craton ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "Stephen Craton" <webmaster@melchior.us> Cc: "PHP List" <php-general@lists.php.net> Sent: Friday, August 22, 2003 6:43 PM Subject: Re: [PHP] Deleting same values from an array > Stephen Craton wrote: > > Hello, > > > > I have an array called $stems that has a bunch of numbers in it like 2, 5, 4, 4, 2, 6, 8. What I want to do is delete a section of the array that has the same number. In the example of the numbers I listed, I'd want to delete one of the number 4's, and one of the number 2's so that it would read this: 2, 5, 4, 6, 8 instead. I'm really clueless as to how to do this, any ideas? > > Wild guess here, but maybe array_unique()??? ;) > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > PHP|Architect: A magazine for PHP Professionals – www.phparch.com > > > > > >

« previous php.general (#160470) next »