/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* in the class foo*/ public function get( $var ) { return $this->$var; } /* example var, also in the class*/ protected $bar = 'hello world' /*used like this*/ $foo = new Foo(); print $foo->get('bar');