RE: [PHP] Re: Globals funkiness

From: Date: Wed, 17 Oct 2001 12:46:56 +0000
Subject: RE: [PHP] Re: Globals funkiness
Groups: php.general 
Request: Send a blank email to php-general+get-71331@lists.php.net to get a copy of this message
> PHP's "global" keyword doesn't "globalize" a variable so much as > say > "inside the current function, whenever I refer to variable such-and-such > I mean the one that's in the global namespace." Yes, I know. However, I was under the impression that global included the variable namespace of the calling function. This is obviously incorrect. > For what you want to do, consider using constants or the $GLOBALS > array. Yes, this is what I ended up having to do. After declaring the value of the variables in doIt(); I added them to the globals array. Odd, round about way of getting it to work, but it did. Chris

« previous php.general (#71331) next »