Codeigniter helper functions are used to small tasks, Each helper file is simply a collection of functions in a particular category.
There are URL Helpers, that assist in making links, there are Form Helpers that help you create form elements, Text Helpers perform various text formatting routines, Cookie Helpers set
and read cookies, File Helpers assist you to modify files, etc.
Unlike most different systems in CodeIgniter, Helpers don't seem to be written in Associate in Nursing Object orienting format.
They are simple, procedural functions.
Each helper perform performs one specific task, with no dependence on different functions.
CodeIgniter doesn't load Helper Files by default, therefore the opening in employing a Helper is to load it.
Once loaded, it becomes globally offered in your controller and views.
Helpers square measure usually keep in your system/helpers, or application/helpers directory.
CodeIgniter will look first in your application/helpers directory.
If the directory doesn't exist or the desired helper isn't situated there CI can instead look in your world system/helpers/ directory.
How to load a helper?
This is quite a simple method of loading a helper code;
Here are sample words saved as “sample.php” in the helper folder, It is purely procedural code!
How to load multiple headers at one time?
This is quite simple, It is used array form of helpers:
<?php $this->load->helper( array('helper1', 'helper2', 'helper3') );
List of Predefined Helpers in Codeigniter
- Array Helper
- Captcha Helper
- Cookie Helper
- Date Helper
- Directory Helper
- Download Helper
- Email Helper
- File Helper
- Form Helper
- HTML Helper
- Inflector Helper
- Language Helper
- Number Helper
- Path Helper
- Security Helper
- Smiley Helper
- String Helper
- Text Helper
- Typography Helper
- URL Helper
- XML Helper