day, April 26, 2001 5:53 AM
Subject: [PHP] how to get var value
> 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 cas
>
>
>
> -Original Message-
> From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 7:53 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] how to get var value
>
>
> Hi,
>
> (this is just an example)
> I have on one page
>
]
Subject: [PHP] how to get var value
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";
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-10@leofric">news:Pine.OSF.3.91.1010426114338.1721
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 $t
5 matches
Mail list logo