title: How to make variables accessible in all controllers in Codeigniter?
body: <p>I added some variables to the bottom of the "CI_Controller" class like so:</p>
  
  <pre><code>$data['foo'] = 'bar';
  $data['animal'] = 'dog';
  $data['justin_beiber'] = 'terrible';
  </code></pre>
  
  <p>Since I want these variables to be accessible on ALL my controllers and since all the controllers extends this CI_Controller, I figured this would work:</p>
  
  <pre><code>echo $data['foo'];
  die();
  </code></pre>
  
  <p>I put this in a controller that extends CI_Controller. But it doesn't output anything. How to get this to work?</p>