class Users extends CI_Controller { public function index() { $this->load->model('user_model'); // Using the model to fetch user data $data['users'] = $this->user_model->get_users(); $this->load->view('users_view', $data); } }
class Calculator extends CI_Controller { public function index() { $data['result'] = math.pow(2, 4); // Result will be 16 (2^4) $this->load->view('calculator_view', $data); } }Package Library: PHP Math Library