Global Variable Variables...

From: Date: Fri, 27 Jul 2001 01:23:21 +0000
Subject: Global Variable Variables...
Groups: php.general 
Request: Send a blank email to php-general+get-59851@lists.php.net to get a copy of this message
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 (#59851) next »