Hi,

'.' used for string concatenation.
For further detailed info regarding strings please check the manual.

You better do this :
echo "The value of foo is {$_SESSION['foo']}";

And its not about SESSION, but strings :)

Donny

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 26, 2005 9:29 AM
Subject: [php-list] A simple question on SESSION. Very simple.


> Hi all,
> 
> 
> I have a simple question. A PHP script looks like this:
> 
>         session_start();
> 
>         echo 'The value of foo is ' .$_SESSION['foo'];
> 
> My question is: why do I need a period "." before $_SESSION? What is the
> functionality of that period?
> 
> Can I do this instead:
> 
>         echo "The value of foo is \$_SESSION['foo'];   "
> 
> Or like this:
> 
>         echo 'The value of foo is '  {$_SESSION['foo'] }  ;
> 
> Thank you.
> 
> Regards,
> N.J.




Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to