note 49586 added to function.unset

From: Date: Wed, 02 Feb 2005 14:33:43 +0000
Subject: note 49586 added to function.unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-84363@lists.php.net to get a copy of this message
usefull tip: if you have session variables like these. <?php echo "<pre>"; $_SESSION["num"] = array(1,2,3,4); var_dump($_SESSION); echo "-<br>"; unset($_SESSION); var_dump($_SESSION); ?> gives out: array(1) { ["num"]=> array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) } } - NULL if you use empty instead unset you get same output as first var_dump($_SESSION) gives. I hope help sb. ---- Manual Page -- http://www.php.net/manual/en/function.unset.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49586 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49586&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49586&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49586&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49586&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49586&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49586&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84363) next »