[PHP] classes and variable scope

2004-12-01 Thread Josh Howe
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 state

Re: [PHP] classes and variable scope

2004-12-01 Thread Richard Lynch
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_g