title: How to access custom config variable in codeigniter controller
body: <p>I have a codigniter project with a custom config file called </p>
  
  <pre><code>application/config/my_config_variables.php:
  </code></pre>
  
  <p>This contains</p>
  
  <pre><code>&lt;?php
  $config['days'] = 20;
  </code></pre>
  
  <p>in :</p>
  
  <pre><code> application/config/autoload.php
  </code></pre>
  
  <p>I've added:</p>
  
  <pre><code>$autoload['config'] = array('my_config_variables');
  </code></pre>
  
  <p>when I try to access this in my controller using:</p>
  
  <pre><code> echo $this-&gt;$config['new_daily_contacts'];
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Fatal error: Cannot access empty property.
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>addendum:</p>
  
  <p>In my controller I've added:</p>
  
  <pre><code> // An alternate way to specify the same item:
              $my_config = $this-&gt;config-&gt;item('my_config_variables',true);
              var_dump($my_config);
  </code></pre>
  
  <p>this outputs FALSE -- why?</p>