direct calls to session variables an array.
Posted: Fri Jan 31, 2003 4:39 pm
Ive tried the following code
and it does not give an error but it also doesn't take the array. Now if I do the following
then it works just fine. Im using PHP 4.0.6. Is there a bug in this version or am I not supposed to be using the global variable like I am. FYI I am using session_start and session_register, I just didn't include that in the code here.
Also if I can't use the code in the first example, is it better to initialize a session variable locally before I use it
vs just using it
Thanks
Code: Select all
$HTTP_SESSION_VARSї'check'] = array(1 => 1);Code: Select all
$check = array(1 => 1);Also if I can't use the code in the first example, is it better to initialize a session variable locally before I use it
Code: Select all
$check = $HTTP_SESSION_VARї'check'];
$check = 1;Which is the proper way to use it?$check = 1;
Thanks