Getting name of referenced variable into string
| From: | Monty | Date: | Fri, 19 Jul 2002 07:40:26 +0000 |
| Subject: | Getting name of referenced variable into string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108458@lists.php.net to get a copy of this message | ||
Is there a way to get and store the name of a referenced variable into
another variable? Example...
$varname = "blah";
checkit($varname);
function checkit(&$name) {
...code...
}
In the function above, I'd like to find out the name of the referenced
variable (pointed to by $name) which should equal "varname" so I can store
this string in another variable (i.e., $thename = "varname").
Is there a way to do this in PHP??
Thanks.