[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;
}
}
$obj = new myClass;
function extFunction() {
return myClass::showVar();
}
I am assuming this isn't working because by calling myClass::showVar
() instead of $obj->showVar() "$this" would be undefined...does
anyone know how to workaround this (e.g. direct access to a variable
via "::" syntax like myClass::variable). Does PHP5 address this at all?
[/snip]
http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php