03 January, 2010

How to load stuff into helpers in CodeIgniter

I like to make websites with dynamic templates, so I use helpers to give data to my views and for displaying them. You can't import "$this->model_name->function_name()" to helper. Instead you can use:
$variable_name = get_instance();

Like this you can load everything into helpers, like models or configuration files and everything you have automatically loaded.

No comments:

Post a Comment