array session variable problem (register_global=off)
| From: | Harry Yu | Date: | Wed, 20 Feb 2002 21:11:51 +0000 |
| Subject: | array session variable problem (register_global=off) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85601@lists.php.net to get a copy of this message | ||
Hi All,
I have register_global = off and I have problem
retrieving array session variable. For example;
Page1.php
<?php
$name = array();
session_register ("name");
$name[first] = "First Name";
$name[last] = "Last Name";
?>
Page2.php
<?
session_start();
echo $_SESSION[name['first']];
echo $_SESSION[name][first];
?>
None of these works. The session file does registered
the array and variables. I can retrieve the array
with the register_global on. Any ideas?
Thanks,
Harry
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com