Welcome Guest, Not a member yet? Register   Sign In
Can i define a function within a funciton and call it from another function i the same class?
#1

[eluser]coldscooter[/eluser]
I want to do something like this in CI:

class myclass(){

function __contruct(){
function test1();
}

public function test1(){
function test2(){
echo 'in function';
}
}

public function test3(){
this->test2();
}

}

So i want to be able to access test2() from within test3(). Is this possible?


Messages In This Thread
Can i define a function within a funciton and call it from another function i the same class? - by El Forum - 04-17-2012, 03:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB