====== Helpers ======
**What Are They?**
Helpers are PHP files with little (or big) snippets of code that you can use anywhere in your application. Helpers are commonly PHP files, with classes, methods and more.
Note: It is highly recommended that you use models instead of helpers whenever possible. However, if you need to use a helper to include a new behavior that is not supported by the core or the extended libraries of the framework.
**Helper Example**
Create a new PHP file at application/helpers/hello.php. This will be your helper and as all yours helpers they will be located in the application/helpers folder.
You can now use this helper in your controllers, views, and models like so:
The above would display "Hello, World!".
**Auto Loading**
If you are going to use a particular helper a lot, then you should consider auto loading it by adding it to the autoload_helpers array in /application/config/config.php like so:
/* Auto Load Helpers */
Config::set('autoload_helper',array("hello"));
It is also possible to load helpers on a controller-by-controller way by adding the $autoload_helpers array to the controller class.
----
[[documentation|Go back to Documentation]]