unset($array[value]) does not work?

From: Date: Wed, 12 Jun 2002 16:45:41 +0000
Subject: unset($array[value]) does not work?
Groups: php.general 
Request: Send a blank email to php-general+get-101763@lists.php.net to get a copy of this message
Hello, I am currently testing out some things with removing elements from arrays, and I find it strange that the following statement does not work for me: unset($array['element']) I wrote a little test script, you can see the source at http://www.antrophia.com/test.txt and the executable at http://www.antrophia.com/test.php ... Now, if you look at the last part: unset ($unserialized['foo']); if (key_exists("foo", $unserialized)) { echo "foo exists!\n"; } if (key_exists("wom", $unserialized)) { echo "wom exists!\n\n"; } You will see that $unserialized['foo'] still exists! Can anyone explain me what I'm doing wrong? Thanks in advance, Leon Mergen

« previous php.general (#101763) next »