In my controller I have to copy and paste this 4 lines of code everytime I make a function in controller.
$this->load->view('include/header', $data);
$this->load->view('include/nav', $data);
$this->load->view('page/index', $data);
$this->load->view('include/footer');
Is there a way to avoid this copy and paste. Like create a function and call it. Please help. Thank you!