RE: [PHP] Newbie - Can't get sessions to work

From: Date: Wed, 22 Oct 2003 19:32:16 +0000
Subject: RE: [PHP] Newbie - Can't get sessions to work
Groups: php.general 
Request: Send a blank email to php-general+get-167153@lists.php.net to get a copy of this message
John Nichel <mailto:jnichel@by-tor.com> on Wednesday, October 22, 2003 11:33 AM said: >> <?php >> echo "foo = {$_SESSION['foo']}<BR>"; >> echo "bar = {$_SESSION['bar']}"; > > Get rid of the "foo =" and the "bar =". when you use the single > equals sign, you're setting value.... 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. Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/

« previous php.general (#167153) next »