note 26449 deleted from function.reset by jmcastagnetto

From: Date: Thu, 31 Oct 2002 04:03:10 +0000
Subject: note 26449 deleted from function.reset by jmcastagnetto
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38812@lists.php.net to get a copy of this message
Perhaps I've missed a one-liner function to do this, but after several hours I thought I'd mention it .... if you are trying to totally ERASE AN ARRAY - so that COUNT returns 0 - as it did before you put something in the array, remember that array_shift is the key. You could try something like this: $tmp=count($this); for ($i=0; $i<=$tmp; $i++) { array_shift($this); }

« previous php.notes (#38812) next »