PHP methods as functions // change scope -
i have class such as
class myclass { function mymethod(){ include(something); } function callme(){ } }
i want call callme()
from include rather than$this->callme();
i hope makes sense?
something this?
class myclass { public function mymethod(){ include(something); } public function callme(){ } }
some other php file:
include 'myclass.php'; $myclass = new myclass(); $myclass->callme();
Comments
Post a Comment