Re: Re: correct syntax
| From: | Hidayet Dogan | Date: | Wed, 25 Jun 2003 11:31:36 +0000 |
| Subject: | Re: Re: correct syntax | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152742@lists.php.net to get a copy of this message | ||
On Wed, 25 Jun 2003, Chris Hayes wrote:
> At 10:08 25-6-03, you wrote:
>
>
> >Harry Wiens wrote:
> >>What would be the correct syntax?
> >>1. $_SESSION[test]
> >
> >in this case "test" is a constant and must be defined
> >by calling define("test", some_integer_value) before
>
> But PHP is extremely tolerant and if it cannot find a defined constant
> called test, or if the array is between double quotes, PHP will read thsi
> as if it is $_SESSION['test'];
>
> example: echo " bla $_SESSION[test] bla ";
----
or: echo " bla {$_SESSION['test']} bla ";
----
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Hidayet Dogan
hidayet.dogan@pleksus.com.tr
Pleksus Bilisim Teknolojileri D.T.O. A.S.
----------------------------------------------------------
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006