title: parser error: syntax error, unexpected $data (T_VARIABLE) in codeIgniter
body: <p>I am newbie in CodeIgniter. When I try to data passing with controller and view and model, I have got this:</p>
  
  <blockquote>
    <p><strong>Syntax error:</strong> Unexpected '$data'(T_VARIABLE) in <em>c:\xampp\htdocs\ci\application\controllers\users.php</em> on <strong>line 10</strong></p>
  </blockquote>
  
  <p>Here is my controller <code>users.php</code> code:</p>
  
  <pre><code>&lt;?php
  class Users extends CI_Controller
      {
          public function show()
              {
                  $data['results']=$this-&gt;user_model-&gt;get_users();
                  $this-&gt;load-&gt;view('user_view',$data);
               }
      }
  ?&gt;
  </code></pre>
  
  <p>At views folder <code>user_view.php</code> code:</p>
  
  <pre><code>&lt;body&gt;
  &lt;?php
  foreach($results as $object){
      echo $object-&gt;username;
  }
  ?&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>At model folder <code>user_model.php</code> code</p>
  
  <pre><code>&lt;?php
  class User_model extends CI_Model
      {
          public function get_users()
              {
                  $query=$this-&gt;db-&gt;get('users');
                  return $query-&gt;result();
              }
      }
  ?&gt;
  </code></pre>
  
  <p>How can I solve this error?</p>