Re: A variable inside a variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$var=1;
$var2="$var";
echo $$var2;

It´ll echo the $var´s value.

Hope it´ll help you.

"Alex Major" <alex.major@xxxxxxxxxxxx> escreveu na mensagem 
news:C0C5ECB8.48CD%alex.major@xxxxxxxxxxxxxxx
> 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. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux