1.

Explain the difference between helper and library in CodeIgniter.

Answer»
Helper Library
Helper is a COLLECTION of common functions which we can use within Models, Views as well as in Controllers. Once we include the helper FILE, we can get access to the functions.Library is a class that has a set of functions that permits for creating an instance of that class by $this->load->library() function.
It is not WRITTEN in object-oriented format.It is written in an object-oriented format.
It can be CALLED in the same manner you call PHP functions.You must create an object of the class to call library functions by using the $this->library_name->method().
All built-in helper file names are suffixed with a word _helper (ex: email_helper.php).All built-in library files do not have a SPECIFIC suffix.


Discussion

No Comment Found