0

I got a problem on create a function that calling a function (index function). For ease of understanding let me explain it:

class My_Controller extends CI_Controller{
    public function index(){
        echo 'This is index function';
    }

    public function calling_index(){
        // doing what's inside the index() function
    }
}

Any suggestion ?

1
  • Have you tried $this->index()? Commented Sep 19, 2018 at 16:19

1 Answer 1

1

There won't be an issue in using

$this->index() 

as the controller is simply a class

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah! Thank you so much

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.