note 10274 rejected and deleted from unset by zak

From: Date: Fri, 22 Dec 2000 17:13:06 +0000
Subject: note 10274 rejected and deleted from unset by zak
Groups: php.notes 
Request: Send a blank email to php-notes+get-9026@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?

« previous php.notes (#9026) next »