Re: Variable Variables and Super Global Arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings, "daniel danon".
In reply to Your message dated Saturday, October 11, 2008, 2:50:34,

> By php.net manual, "Please note that variable variables cannot be used with
> PHP's Superglobal arrays  within functions or class methods". Is there any
> way to override this problem? Just the not nice eval("return $variable");?

> and in simple words - is there any way to make the following code work:

> $varname = "\$_SERVER['REMOTE_ADDR']";
> $varvalue = $$varname;


First of all, why you need it to work?
Explain real case please.


-- 
Sincerely Yours, ANR Daemon <anrdaemon@xxxxxxxxxxx>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux