[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
$test=1;
$var1='test';
on another page I want to be able to construct variable from the value in
$var1 (test
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
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
]
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;
now $newvar contains
: [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;
now $newvar contains
5 matches
Mail list logo