CodeIgniter – accessing $config variable

To access the variables defined in the applocation/config/config.php in the other places in your application,

for example I have declared on config item called ‘api_key’  in our config file

to access this in your controller or views