Accessing Variables by Name
| From: | Steven Walker | Date: | Tue, 14 May 2002 19:38:00 +0000 |
| Subject: | Accessing Variables by Name | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-97612@lists.php.net to get a copy of this message | ||
Hi,
I couldn't find this in the documentation or on marc... Is there a way to access a variable by name using a string value? For example:
$myvariable = 10;
$stringdata = "myvariable";
$[$stringdata] == $myvariable;
Obviously the last line is invalid, but is there a way to do this? I know about associative arrays, but they do not solve my particular problem. TIA.
Steven J. Walker
Walker Effects
www.walkereffects.com
steve@walkereffects.com