- In codigniter, views will never call directly. They must be loaded by the controller. In an MVC framework, the controller is responsible for loading a particular view.
- Before going to view section, you must read about controllers in codigniter.
Page Contents:
- Creating a view
- Loading a view
- Loading multiple views
- Adding dynamic data to the view
- Storing views within subdirectories
- Creating loops
- Returning views as data
Creating a view
Loading a view
Loading multiple views
Storing views within subdirectories
Adding Dynamic Data to the View
$data = array(
'title' => 'My Title',
'heading' => 'My Heading',
'message' => 'My Message'
);
$this->load->view('blogview', $data);