Welcome Guest, Not a member yet? Register   Sign In
how to call a function of a controler
#1

[eluser]aktosci[/eluser]
I have a controler
function index()
function f1()
{
..
}

Il would like to use this fonction1 in a second fonction

function f2()
{
..
f1()
..
}

How is the systax ? In normal php it works well but here I dupplicate my code. I don't use the benefit of CI.
#2

[eluser]TheFuzzy0ne[/eluser]
You'd need to prefix it with [/b]$this->[/b]:
Code:
$this->f2();
#3

[eluser]aktosci[/eluser]
Thank you it was what I was looking for.




Theme © iAndrew 2016 - Forum software by © MyBB