Codeigniter Load Multiple Views


Codeigniter load multiple views : You can load multiple views inside the controller function.


Codeigniter loads multiple views and appends them as final output.

Syntax for Codeigniter load multiple views

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Myblog extends CI_Controller {

public function index(){

   $this->load->view("header_view");
   $this->load->view("content_view");
   $this->load->view("footer_view");

}

}

So you can load multiple view as above as per your need.


User Ans/Comments

📖 Read More


Advertisements