I need to pass parameters to the controller, In the below I have mention a brief explanation with the code,
Controller
class Site2 extends CI_Controller
{
function index()
{
$this->load->helper('url');
$this->home();
}
public function home()
{
$this->load->model('get_company_model');
$this->load->model('bank_account_model');
$data['results'] = $this->get_company_model->get_All();
$this->load->view('view_header');
$this->load->view('view_nav',$data);
$this->load->view('view_content');
$this->load->view('view_footer');
}
in the results array there are id and name,I can get these values in my view, then I need to pass id as parameters and call the function in controller.
view
<?php
foreach($results as $row){
echo $row->id;
//I need to pass this particular id to the function
}?>