[PHP] $_SESSION only takes 1 character?

2002-10-01 Thread Tim Stoop

Hi there,

I've got some strange behaviour here (at least, I can't explain it). I'm 
running PHP 4.2.3 on a Mandrake 9.0 machine. I'm using sessions in my 
little app and want to use the $_SESSION-variable to keep track of all my 
variabeles.

Well, when I tell it
$_SESSION[something-intelligent] = $myName;
echo($_SESSION[something-intelligent]);

I get Tim on my screen. But when I do:

$nr = 12;
$_SESSION[things][$nr][intelligent] = $myName;
echo $_SESSION[things][$nr][intelligent];

I don't get any output at all! Can anyone shed any light on this? Thanks in 
advance!!

-- 
Kind regards,
Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $_SESSION only takes 1 character?

2002-10-01 Thread @ Edwin

Hello,

On Tuesday, October 01, 2002 11:13 PM
Subject: [PHP] $_SESSION only takes 1 character?
Tim Stoop wrote:
 Hi there,

 I've got some strange behaviour here (at least, I can't explain it). I'm
 running PHP 4.2.3 on a Mandrake 9.0 machine. I'm using sessions in my
 little app and want to use the $_SESSION-variable to keep track of all my
 variabeles.

 Well, when I tell it
 $_SESSION[something-intelligent] = $myName;
 echo($_SESSION[something-intelligent]);

 I get Tim on my screen. But when I do:

 $nr = 12;
 $_SESSION[things][$nr][intelligent] = $myName;
 echo $_SESSION[things][$nr][intelligent];

 I don't get any output at all!

What happens? No error message? Nothing?

Anyway, you can try this:

  echo {$_SESSION[things][$nr][intelligent]};

Can anyone shed any light on this? Thanks in
 advance!!


- E

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php