note 39208 rejected from language.variables.scope by betz

From: Date: Tue, 20 Jan 2004 20:46:02 +0000
Subject: note 39208 rejected from language.variables.scope by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63902@lists.php.net to get a copy of this message
Note Submitter: icokan@abv.bg ---- So as I see it - If I have to count on many variables, defined for instance in a config.inc.php file, that's included in another inlude file - lets say functions.inc.php - I have but three alternatives for access to them: 1) declare all the needed varables with the global statement in config.inc.php - gthat means I have to enumerate them all, which is inefficient; 2)declare the vars as global in the functions.inc.php, which means to enumerate them <=>inefficient; 3)include the config.inc.php in each function in the functions.inc.php - which is n times more inefficient; Am I right and is there a shortcut way through this issue? macca

« previous php.notes (#63902) next »