How to use two views in one controller in codeigniter
function index()
{
$data['title'] =" Details";
$data['courses']=$this->coursemodel->getcourse();
$data['batches']=$this->coursemodel->getbatchname();
$this->load->view('admin/fees/coursereport',$data);
}
first view
$this->load->view('admin/fees/coursedetails',$data);
second view
$this->load->view('admin/fees/coursereport',$data);
My question is how to use two views in one controller in codeigniter
Use third parameter of view() and insert the result to another string. Finally, print that string as you like:
Finally, at the end of your script:
UPDATE
I see that you updated your question. If the above is not what you looking for, maybe this is:
The idea here is, by checking what view you really want. Is it what you needed?