Re: A variable inside a variable?
| From: | Jo�o C�ndido de Souza Neto | Date: | Mon, 26 Jun 2006 19:05:22 +0000 |
| Subject: | Re: A variable inside a variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238660@lists.php.net to get a copy of this message | ||
$var=1;
$var2="$var";
echo $$var2;
It´ll echo the $var´s value.
Hope it´ll help you.
"Alex Major" <alex.major@allydm.co.uk> escreveu na mensagem
news:C0C5ECB8.48CD%alex.major@allydm.co.uk...
> Thanks for your help with my other question, heres a new one for you.
>
> I need to nest a variable, inside another variable. For example:
>
> $($buildingname)level
>
> How (if at all) is this possible?
>
> Thanks.
> Alex.