Re: Variable Variables and Super Global Arrays
| From: | ANR Daemon | Date: | Sun, 12 Oct 2008 03:52:27 +0000 |
| Subject: | Re: Variable Variables and Super Global Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281737@lists.php.net to get a copy of this message | ||
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@freemail.ru>