Can someone please suggest me how to pass the values from a controller to and then to another view inside the template
below is my controller
$this->load->model('list_model');
$data['lists']=$this->list_model->loadhome();
$data['body']='content';
$data['right']='right';
$this->load->view('template',$data);
below is my template view
$this->load->view('includes/header');
$this->load->view($body);
$this->load->view($right);
$this->load->view('includes/footer');
what i want to do is pass $data[‘lists’] from the controller to $this->load->view($body);
can someone tell me how can i do it?
Try