----------
        From:  Boget, Chris [SMTP:[EMAIL PROTECTED]]
        Sent:  07 January 2002 19:20
        To:  'Kevin Stone'; Rodney Davis; [EMAIL PROTECTED]
        Subject:  RE: [PHP] global generation

        > Wait until after the for loop has completed.
        > for ($i=0; $i< $num_results; $i++) {
        > $variable[$i];
        > }
        > global $variable;

        That's not going to work.  The only thing that is doing is
        making an already global instance of $variable global 
        within the function.
        What you want is this instead:

        $GLOBALS[$variable] = $variable;
        $GLOBALS["variable"] = $ variable, typo I assume

        Tim, www.chessish.com

        Chris

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