Re: echo and Session Variables
| From: | David Johansen | Date: | Thu, 21 Mar 2002 23:26:07 +0000 |
| Subject: | Re: echo and Session Variables | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89607@lists.php.net to get a copy of this message | ||
Thanks that fixed the problem, but I have a question then. Am I supposed to
put the ' in the $_SESSION[] in the normal parts of code. Thanks,
Dave
"Miguel Cruz" <mnc@stoic.net> wrote in message
news:Pine.LNX.4.44.0203211648020.7613-100000@stoic.net...
> 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
>