echo and Session Variables

From: Date: Thu, 21 Mar 2002 22:45:44 +0000
Subject: echo and Session Variables
Groups: php.general 
Request: Send a blank email to php-general+get-89601@lists.php.net to get a copy of this message
I was just wondering if there's a way to use echo with session variables. When I try to do this: <?php if (isset($_SESSION['x_Email'])) echo "value=\"$_SESSION['x_Email']\""; ?> it gives me this error: Parse error: parse error, expecting T_STRING' or T_VARIABLE' or `T_NUM_STRING' in /home/storings/public_html/uslogin.php on line 134 Am I doing something wrong or is there a better way to do this? I know that I could use printf() but is there a way to do it with echo and is accessing the session variables with $_SESSION[] the "right" way to do it? Thanks, Dave

« previous php.general (#89601) next »