what is CodeIgniter Helpers?

Helpers, as their name implies, help you with specific tasks. Unlike libraries, helpers are not object -oriented but procedural in nature. Each helper contains one or more functions, each focusing on a
specific task, with zero dependence on other functions.

Helpers can either be loaded locally or autoloaded in /system/application/config/autoload.php.

CodeIgniter's  helpers:

Array —  The   Array helpercontains functions that help you work with arrays. For example, the
random_element()function takes an array as input and returns a random element from it.

Cookie —  The   Cookie helpercontains functions that help you set, read, and delete cookie data.

Date —  The   Date helpercontains functions that help you work with dates. For example, the
now function returns the current time as a UNIX time stamp.

Directory —  The   Directory helpercontains a single function that helps you work with directories.
For example, the directory_mapfunction reads a specified directory path and builds an array
of it that contains all of its files and subdirectories.


Download —  The   Download helpercontains a single function that helps you download data
easily. The force_download()function generates server headers that force data to be
downloaded instead of viewed in a browser.

File —  The   File helpercontains functions that help you read, write, and delete files.

Form —  The   Form helpercontains functions that help you build forms. It is probably one of the
most used helpers in the CodeIgniter toolbox.

HTML —  The   HTML helpercontains functions that help you create HTML blocks quickly and
easily. For example, the ul()function can turn an array of items into a bulleted list.

Inflector —  The   Inflector helpercontains functions that help you to turn words into plural or
singular form, to apply camel case, or to turn words separated by spaces into an underscored
phrase.

Security —  The   Security helpercontains security - related functions like xss_clean(),  which
filters out any code that may be used in a cross site scripting hack.

Smiley —  The   Smiley helpercontains functions that help you manage emoticons. The functions
in this helper might seem superfluous, but become invaluable if you are coding a bulletin board
or chat application.

String —  The   String helpercontains functions that help you work with strings, like the random_
string  function, which as its name implies, creates random strings based on type and length
arguments.

Text —  The   Text helpercontains functions that help you work with text. For example, the word_
limiter function can limit a string to a certain number of words, which is useful if you ’ re
trying to limit user input on a form.

Typography —  The   Typography helpercontains a single function that helps you format text in
appropriate ways. For example, the auto_typography()function wraps paragraphs with < p >
and < /p > , converts line breaks to < br/ > , and converts quotes, dashes, and ellipses properly.

PHP, you can use the substr()function instead of the word_limiter or character_limiter
made available by the Text helper. Certainly, you ’ re not forced to use helpers, but they ’ re made available
to you, and they do a fine job of saving time and effort.