Run & See Output
Output :
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class MyUsers extends CI_Controller { public function users(){ //load model $this->load->model('My_first_model'); // now call model method $data['users'] = $this->My_first_model->getData(); $this->load->view('MyUsers_view', $data); } } ?>