Welcome Guest, Not a member yet? Register   Sign In
Inherit Function
#1

[eluser]Unknown[/eluser]
Hello guys I'm still newbie in CI, I want to ask how to make one function as parent so it can pass the variable and parameter to all function in one class.

example :

Code:
class Test extends CI_Controller{

var $a;

function testeR(){

$this->a = "test";


}

function testeZ(){


print_r($this->a);

}


}

Of course if I test run testeZ() it will no result, so... how to make testeZ() read testeR() function?




Theme © iAndrew 2016 - Forum software by © MyBB