Codigniter

Pass data from a function in a model to a controller in Codigniter

A controller in MVC (Model View Controller) is responsible for the application flow of the program. Suppose you made a request in MVC pattern like structure, the controller is responsible for returning the response to the view. The controller can different types of values based on the application request. A controller is actually a coordinator between the model and view.

     

What is codigniter

Controller files are located in the application/controllers/ directory. A controller is a class file name that is associated with a URI. To specify a default controller, open your application/config/routes.php and set in this your variable.