[PHP] Class Variable Scope Question

2006-03-15 Thread Mike Dunlop
Hi Guys, I am wondering how to be able to call a class variable from within an outside function using the :: syntax: See an example of the logic I am using below: class myClass { var $variable = 1; function showVar() { return

RE: [PHP] Class Variable Scope Question

2006-03-15 Thread Jay Blanchard
[snip] I am wondering how to be able to call a class variable from within an outside function using the :: syntax: See an example of the logic I am using below: class myClass { var $variable = 1; function showVar() { return $this-variable;

Re: [PHP] Class Variable Scope Question

2006-03-15 Thread Jochem Maas
Mike Dunlop wrote: Hi Guys, I am wondering how to be able to call a class variable from within an outside function using the :: syntax: See an example of the logic I am using below: class myClass { var $variable = 1; // this works in php4. ?php class myClass { function

Re: [PHP] Class Variable Scope Question

2006-03-15 Thread Mike Dunlop
the fact that you think that it might even be possible that doing myClass::showVar() would cause $this in showVar() to refer to $obj suggests that you don't understand [to some degree] either classes, objects and/or scope (or at least how its implemented/applied in php). No Jochem, I may have

Re: [PHP] Class Variable Scope Question

2006-03-15 Thread Mike Dunlop
Nevermind - i found the documentation that answers my question - thanks for the help Jeremy and Jochas. - MD ... Mike Dunlop Director of Technology Development [ e ] [EMAIL PROTECTED] [ p ] 323.644.7808 On Mar 15, 2006, at