note 88114 deleted from function.session-unset by danbrown

From: Date: Sun, 11 Jan 2009 16:40:38 +0000
Subject: note 88114 deleted from function.session-unset by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149058@lists.php.net to get a copy of this message
Note Submitter: opurahman at gmail dot com ---- session_unset() resets local variables. I was trying to reset session variables after storing two values from session. It reset the local variables. Lets take a look into the codes bellow. <?php session_start(); $message = sprintf('%s', $_SESSION['message']); echo('Here Message: - ' . $message . '<br />'); session_unset(); echo('Here Message: - ' . $message . '<br />'); // in this line, the variable $message has been unset. ?> PHP 5.2.8 in Linux

« previous php.notes (#149058) next »