title: codeigniter - retrieve controller variables in view (using $this)
body: <p>in my controller i have an public variable i want to use in my view.</p>
  
  <pre><code>public $header = array("show_menu"=&gt;true);
  </code></pre>
  
  <p>Traditional i would pass variables as an array to the <code>load-&gt;view("incl_header",$header)</code> function, however i have noticed that in my view i can retrieve variables of my controller like so:</p>
  
  <pre><code>echo  $this-&gt;header['show_menu'];
  </code></pre>
  
  <p>Are there any problems retrieving variables like this in my view file?</p>
  
  <p>I am using codeigniter 2.1.3</p>