note 10274 added to unset
| From: | superfly at jocose dot net | Date: | Fri, 22 Dec 2000 17:07:37 +0000 |
| Subject: | note 10274 added to unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9025@lists.php.net to get a copy of this message | ||
In php 4.0.3pl1 if you unset an array some strange things happen.
if you build an array like so:
$array[1] = "hi";
$array[3] = "hello";
and then unset it:
unset($array);
then do this:
$array[2] = "ummm...";
the array looks like this:
$array[1] = "";
$array[2] = "ummmm...";
$array[3] = "";
It seems to just always keep all the keys. Is there a way to destroy the keys too?
http://www.php.net/manual/function.unset.php