Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] HOW to call function in the same controller..
#1

[eluser]husni[/eluser]
hey guys..
how to call another function in the same controller??
i think i have found it in tutorial..but i lost it..
so how??
#2

[eluser]Rob Gordijn[/eluser]
using $this->function();

like:
Code:
<?php
class bla
{
    function foo()
    {
        // calling method bar() in class bla
        $this->bar();
    }
    
    function bar()
    {
        echo 'barrrrr';
    }
}
#3

[eluser]husni[/eluser]
[quote author="Rob Gordijn" date="1264773804"]using $this->function();

like:
Code:
<?php
class bla
{
    function foo()
    {
        // calling method bar() in class bla
        $this->bar();
    }
    
    function bar()
    {
        echo 'barrrrr';
    }
}
[/quote]

thank you so much rob!
i appreciate it :-)
#4

[eluser]Rob Gordijn[/eluser]
NP Husni, enjoy




Theme © iAndrew 2016 - Forum software by © MyBB