Re: session variables and scope?

From: Date: Tue, 03 Oct 2000 07:35:28 +0000
Subject: Re: session variables and scope?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18380@lists.php.net to get a copy of this message
Is there anyway of declaring a variable global outside functions so that it appears global inside all functions? For example: <?php make_variable_global($foo); $foo = "some content"; function bar() { echo "I can see $foo here"; } ?> What I want to know is what I can put in place of make_variable_global? This would be very handy for things such as database identifiers, which get set once but are needed all over the place. Cheers, Edmund. -- *********************************************************** *** Edmund von der Burg *** edmund@ecclestoad.co.uk *** *** Eccles & Toad *** http://www.ecclestoad.co.uk *** ***********************************************************

« previous php.general (#18380) next »