title: codeigniter: access config variables from other config files?
body: <p>I have two config files.</p>
  
  <p>config.php (code igniters core config)</p>
  
  <p>and email.php (autoloaded by the email class when it is used)</p>
  
  <p>What i am wanting to do is.</p>
  
  <p>In config.php have</p>
  
  <p><code>$config['env'] = 'hailwood_dev';</code></p>
  
  <p>then in email.php have</p>
  
  <pre><code>if($config['env'] == 'hailwood_dev'){
  //email variables like smtp server to do with localhost
  } elseif($config['env'] == 'production'){
  //email variables like smtp server to do with production
  }
  </code></pre>
  
  <p>But this is not having any effect (im guessing as $config['env'] does not have those values).</p>
  
  <p>How can I access this value?</p>