Re: echo and Session Variables
| From: | Miguel Cruz | Date: | Thu, 21 Mar 2002 22:48:48 +0000 |
| Subject: | Re: echo and Session Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89602@lists.php.net to get a copy of this message | ||
On Thu, 21 Mar 2002, David Johansen wrote:
> 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']\"";
> ?>
The issue is with the syntax you're using to refer to arrays within double
quotes.
echo "value=\"{$_SESSION[x_Email]}\"";
miguel