Variable Variables and Super Global Arrays
| From: | daniel danon | Date: | Fri, 10 Oct 2008 22:50:34 +0000 |
| Subject: | Variable Variables and Super Global Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-281699@lists.php.net to get a copy of this message | ||
Hi, I was wondering,
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;
?