hi,
by .= you assign the value to a var in this case a string.
$test = 1;
$var = "test";
$newvar = $$var;
echo $newvar; // outputs "1"
Johannes
"AJDIN BRANDIC" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
Pine.OSF.3.91.1010426114338.17213A-100000@leofric">news:Pine.OSF.3.91.1010426114338.17213A-100000@leofric...
> Hi,
>
> (this is just an example)
> I have on one page
>
> $test=1;
> $var1='test';
>
> on another page I want to be able to construct variable from the value in
> $var1 (test in this case) and print its value. So,
>
> $newvar=$;
> $newvar.=echo"$var1";
>
> now $newvar contains string '$test' but not the value of $test (1 in this
> case).
>
> There has to be way aroud this but I am just cannot find it :(.
>
> Regards
>
> Ajdin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]