Re: Newbie - Can't get sessions to work

From: Date: Wed, 22 Oct 2003 19:50:14 +0000
Subject: Re: Newbie - Can't get sessions to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167155@lists.php.net to get a copy of this message
>> <?php >> echo "foo = {$_SESSION['foo']}<BR>"; >> echo "bar = {$_SESSION['bar']}"; > Not when it's inside a string. > His statements should output the following: > foo = somevalue<BR> > bar = anothervalue > Also... he's using { and } because you can't access an array's value > unless it's within curly braces. Not entirely true. You can still do the following: echo "foo = $_SESSION[foo]<BR>"; echo "bar = $_SESSION[bar]"; Chris

« previous php.general (#167155) next »