Re: $$var
| From: | Mujtaba Arshad | Date: | Sun, 06 Mar 2011 23:51:05 +0000 |
| Subject: | Re: $$var | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311719@lists.php.net to get a copy of this message | ||
If $a = 'foo'
and $$a = nothing (i.e. no value assigned to $foo) you will get an error if
you tried to use this to do something else.
On Sun, Mar 6, 2011 at 3:21 PM, tedd <tedd.sperling@gmail.com> wrote:
> At 6:42 PM +0530 3/6/11, Ashim Kapoor wrote:
>
>> Dear All,
>>
>> I was reading the php manual for session_register, and I found the
>> following
>> line there : -
>>
>>
>> $_SESSION[$var] = $$var;
>>
>> Why do I need $$ there ? Can someone explain?
>>
>> Thank you,
>> Ashim
>>
>
> Ashim:
>
> You don't need to user session_register().
>
> Cheers,
>
> tedd
>
>
> --
> -------
> http://sperling.com/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Mujtaba