Questions on user sessions and variable scope.

From: Date: Tue, 20 Jun 2000 22:05:26 +0000
Subject: Questions on user sessions and variable scope.
Groups: php.general 
Request: Send a blank email to php-general+get-2374@lists.php.net to get a copy of this message
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

« previous php.general (#2374) next »