View file File name : Balancetransfer.php Content :<?php class Balancetransfer extends CI_Controller{ public function index(){ try{ $this->load->model('Bank_model'); $data= $this->Bank_model->get_comparision('balance'); $this->load->view('balance-transfer',['data'=>$data]); } catch(exception $e){ print($e); } } }