[PHP] classes and variable scope
Hi all, If I have the following code: $some_global_variable; Class foo { Function test() { set_global(); echo $some_global_variable; } Function set_global () { $some_global_variable = abcd; echo $some_global_variable; } } The first echo
Re: [PHP] classes and variable scope
Josh Howe wrote: Hi all, If I have the following code: $some_global_variable; Class foo { Function test() { set_global(); echo $some_global_variable; } Function set_global () { $some_global_variable = abcd; echo $some_global_variable;