Re: array_unique() workaround?

From: Date: Wed, 14 Nov 2001 08:26:49 +0000
Subject: Re: array_unique() workaround?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74557@lists.php.net to get a copy of this message
You can: 1) make a "while" cycle 2) pop the value 3) use the in_array to check if the value is in the array (pop means "extract" not only "get") 4) if in_array function returns true "push" the value in a new array J "Spunk S. Spunk III" <spunk@mac.com> ha scritto nel messaggio news:B817E70E.E7AA%spunk@mac.com... > I'm working on a script that needs array_unique() but my host is using 4.0.4 > and it's broken in that build. Does anyone have a good workaround for this? > I can wait for my host to upgrade but if I release this code, it would be > better to have the workaround... > > I just need a good way to check for dups in an array and remove them. I > can't get my brain around it... > > TIA > Spunk >

« previous php.general (#74557) next »