Welcome Guest, Not a member yet? Register   Sign In
simple question - functions in controler
#1

[eluser]Unknown[/eluser]
edit:
I found out how it works, so this thread is closed.


Code:
function foo(){
   echo('do something');
   $this->bar(); // the call to the class itselfs(with $this->) is a must (so I guess).
}



Hi there,

this is quite a newbQuestion, because I am a newb.
I wonder why I can't call in my controler a function from within another function – like:

Code:
function foo(){
   echo('do something');
   bar(); // this wont work – why?
}

function bar(){
   echo('do something I will need a couple of times');
}

Thanks for your help.




Theme © iAndrew 2016 - Forum software by © MyBB