OZONE Asylum
FAQ
Why is PHP ignoring my 'global'?
This page's ID:
5553
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "Why is PHP ignoring my 'global'?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Context You have a global variable inside a function, that doesn't seem to be global at all. (ie. it doesn't have the value it's supposed to) Likely solution Your calling the function (a) where you declared the variable global from another function (b) where you set the variable. But the variable isn't declared global in (b). So make it global there, and your problems will vanish. (Tends to happen with callbacks all of the time ;-)) [small][i](Added by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Tyberius+Prime]Tyberius Prime [/url] on Tue 11-Feb-2003)[/i][/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »