In article <9bjvo1$irv$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Ben")
wrote:
> i'm trying to use sessions with my project, but it seems that registered
> variables in a session aren't global by default.
They should be. Can you show an example of the code that leads you to
believe they're not?
If you want to access a global variable in a function, it must be declared
"GLOBAL". Otherwise PHP's local scope would be totally useless.
If you want to access a variable inside of a function, you must explicitly
declare it as global.
There are a few exceptions such as $GLOBALS, but they should
2 matches
Mail list logo