CodeIgniter - accessing $config variable in view
You can do something like that:
$ci = get_instance(); // CI_Loader instance
$ci->load->config('email');
echo $ci->config->item('name');
Also, the Common function config_item()
works pretty much everywhere throughout the CodeIgniter instance. Controllers, models, views, libraries, helpers, hooks, whatever.
$this->config->item()
works fine.
For example, if the config file contains $config['foo'] = 'bar';
then $this->config->item('foo') == 'bar'