Re: FN-FORUM: PHP - WHAT AM I DOING WRONG
date posted 14th June 2003 14:51
Paul Civati [EMAIL REMOVED] wrote:
> When you have global variables, and wish to access them inside a function
> then you need to use 'global $fooglobal', this effectively gives you a local
> *copy* of that global inside the function. This means you can do what you
> like with it, but it won't have any effect on the actual global value because
> you're only modifying the copy.
>
> If you want to actually gain access the real global then try using the magic
> global array, so $GLOBALS['Franchise_error_msg'] in your example.
Actually, scrap that, I think that's wrong, 'global' inside the function
should work. Sorry!
-Paul-