Re: Questions on user sessions and variable scope.
| From: | Rasmus Lerdorf | Date: | Tue, 20 Jun 2000 22:06:28 +0000 |
| Subject: | Re: Questions on user sessions and variable scope. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2379@lists.php.net to get a copy of this message | ||
Nope
On Tue, 20 Jun 2000, Warren Vanichuk wrote:
>
> Greetings.
>
> Is there any way that I can define a particular set of variables to be
> global in scope in a single location? Currently I am declaring them global
> in each and every function that I define, but this is getting rather
> cumbersome. I would just like to be able to include a file that will
> declare the variables global in scope, then have any function be able to
> reference the variable without a scope declaration inside the function
> itself.
>
> Reading through the documentation, I found the $GLOBALS associative array,
> but the examples show it inside a function. If I declare variables global
> within this array outside of a function definition, will they take on a
> truely global scope? :)
>
> Any information people could offer me would be greatly appriecated. :)
>
> Sincerely, Warren
>
>
>