title: A PHP Error was encountered Severity: Notice Message: Undefined variable
body: <p>I am just new to CodeIgniter and i encounter a PHP error -  </p>
  
  <blockquote>
    <p>Severity: Notice  Message: Undefined variable</p>
  </blockquote>
  
  <p>My Controller :  <code>C:\wamp\www\Code1\application\config\hello.php</code></p>
  
  <pre><code>&lt;?php
  class Hello extends Controller {
  
      var $name;
      var $color;
  
      function Hello()
      {
          parent::Controller();       
          $this-&gt;name = 'Andi';
          $this-&gt;color= 'red';
      }
  
      function you()
      {
          $data['name'] = $this-&gt;name;
          $data['color'] = $this-&gt;color;
          $this-&gt;load-&gt;view('you_view', $data);
      }
  }
  ?&gt;
  </code></pre>
  
  <p>My Views :  <code>C:\wamp\www\Code1\application\views\you_view.php</code></p>
  
  <pre><code>Hello, 
  &lt;font color="&lt;?=$color?&gt;"&gt;&lt;?=$name?&gt;&lt;/font&gt;!
  </code></pre>