Re: Array function to delete

From: Date: Thu, 25 Apr 2002 20:27:48 +0000
Subject: Re: Array function to delete
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94651@lists.php.net to get a copy of this message
Thanks for all your help, everyone, but both suggestions (unset and array_slice) pretty much didn't improve on my current way. I was jsut trying to find a faster way, but unset doesn't seem to be working properly (but I'll need to fiddle more) and the array_slice way is just too intensive. for($counter = 0; $counter < count($listitems); $counter++) { if($listitems[$counter] != $item) $newlist .= ",$listitems[$counter]"; } $newlist = substr($newlist, 1, strlen($newlist)); $listitems = explode("," $newlist); __________________________________________________ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/

« previous php.general (#94651) next »