Explain helpers in CodeIgniter and how to load helper file?

devquora
devquora

Posted On: Feb 22, 2018

 

As the name suggests, helpers help you with tasks.Each helper file is simply a collection of functions in a particular category.They are simple, procedural functions.Each helper function performs one specific task, with no dependence on other functions.

CodeIgniter does not load Helper Files by default, so the first step in using a Helper is to load it. Once loaded, it becomes globally available in your controller and views.

Helpers are typically stored in your system/helpers, or application/helpers directory

Loading a helper file is quite simple using the following method:

$this->load->helper('name');

Where name is the file name of the helper, without the .php file extension or the “helper” part.
Read More

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    CodeIgniter Interview Questions

    How to check the version of CodeIgniter framework?

    How to check the version of CodeIgniter framework?..