RE: [PHP] how to get var value

From: Date: Thu, 26 Apr 2001 14:20:41 +0000
Subject: RE: [PHP] how to get var value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50460@lists.php.net to get a copy of this message
Thanks Ajdin On Thu, 26 Apr 2001, PHPBeginner.com wrote: > try > > $newvar = ${$var1}; > > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > > PHPBeginner.com (Where PHP Begins) > maxim@phpbeginner.com > www.phpbeginner.com > > > > > -----Original Message----- > From: AJDIN BRANDIC [mailto:abrandic@coventry.ac.uk] > Sent: Thursday, April 26, 2001 7:53 PM > To: php-general@lists.php.net > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#50460) next »