In this section, we'll see an example to pass parameters from controller
to view
.
The Controller
Using a text editor, create a controller called Parameter.php. In it, place this code and save it to your application/controllers/
directory:
<?php
class Parameter extends CI_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$data['title'] = "Welcome to Nexladder! This is CodeIgniter Tutorial (Passing Parameter)";
$this->load->view('parameter_view', $data);
}
}
?>