note 26449 added to function.reset
| From: | jkloss at hotmail dot com | Date: | Thu, 31 Oct 2002 03:47:52 +0000 |
| Subject: | note 26449 added to function.reset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38808@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);
}
--
http://www.php.net/manual/en/function.reset.php
http://master.php.net/manage/user-notes.php?action=edit+26449
http://master.php.net/manage/user-notes.php?action=delete+26449
http://master.php.net/manage/user-notes.php?action=reject+26449