How to call codeigniter controller function from view? When i call the function in a controller, get a 404 page.
I would like to answer this question as this comes all times up in searches --
You can call a controller method in view, but please note that this is not a good practice in any MVC including codeigniter.
Your controller may be like below class --
Now You can call this function in view files as below --
abc($id) ;
?>