note 55278 deleted from function.session-start by mazzanet

From: Date: Fri, 29 Jul 2005 05:38:39 +0000
Subject: note 55278 deleted from function.session-start by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-92688@lists.php.net to get a copy of this message
Note Submitter: bkfake-forum at yahoo dot com Reason: useless ---- here's a peculiarity: $array = array( 'foo' => 'bar', ); session_start(); $_SESSION = $array; exit; //$_SESSION is now a copy of $array... // and the session file is created.. however it's a zero length file. instead of $_SESSION = $array; gotta use: foreach ( $array as $k => $v ) $_SESSION[$k] = $v; might save a bit of frustration not sure what the reason for this flaky behavior is

« previous php.notes (#92688) next »