[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;
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
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
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
4 matches
Mail list logo