Re: Global Variable Variables...

From: Date: Fri, 27 Jul 2001 02:20:35 +0000
Subject: Re: Global Variable Variables...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-59858@lists.php.net to get a copy of this message
Read "References explained" section in PHP Manual. You'll see why it does not work as you expected. -- Yasuo Ohgaki "Php@Swifte.Net" <php@swifte.net> wrote in message news:E15PwLZ-0007Q6-00@artemis.jtlnet.com... > I have a class that contains a form, when the form is submitted it > posts back to the class. The class is included inside of another file, > so all of the form variables need to be declared as global in order to > access their values. > > On the form are several check boxes (number undetermined until the > script is run) and the only way I know to access these values is using > the "variable variables" feature of PHP, as follows: > > $A = "chkContact".$I; > $B = $$A; > > This would work just fine if $chkContact## was not a global variable > (ie..not wrapped inside of a class). How can I use variable variables > on a global variable?

« previous php.general (#59858) next »