title: Parse Error Codeigniter
body: <blockquote>
  <p>A PHP Error was encountered</p>
  <p>Severity: Parsing Error</p>
  <p>Message: syntax error, unexpected '$this' (T_VARIABLE)</p>
  <p>Filename: controllers/user.php</p>
  <p>Line Number: 6</p>
  </blockquote>
  <p>Backtrace:</p>
  <pre><code>public function __construct()
  
  {
      
      parent::__construct()
      
      $this-&gt;load-&gt;model('user_model', $data);
  
  }
  </code></pre>
  <p>Updated From Comment</p>
  <pre><code>&lt;?php if(!defined('BASEPATH')) die(&quot;No direct Script Access allowed&quot;); 
  
  class user extends CI_Controller { 
  
  public function index(); { 
  
      if(($this-&gt;session-&gt;userdata('user_name')!=&quot;&quot;)) { 
  
       $this-&gt;welcome(); 
  
  } 
  }
  </code></pre>