try
$newvar = ${$var1};
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-----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
$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]