Read "References explained" section in PHP Manual.
You'll see why it does not work as you expected.

--
Yasuo Ohgaki


"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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?


-- 
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]

Reply via email to