note 9019 added to Variable variables
| From: | terium at techie dot com | Date: | Wed, 11 Oct 2000 20:20:54 +0000 |
| Subject: | note 9019 added to Variable variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6386@lists.php.net to get a copy of this message | ||
You can have a variable variable that depends on more than one variable:
$var1="hello_";
$var2="world";
$hello_world = "hi everyone";
echo ${$var1.$var2};
Should output: hi everyone
http://www.php.net/manual/language.variables.variable.php