title: CodeIgniter select and display result in view
body: <p>I have the following simple code:
  The model:</p>
  
  <pre><code>function get_last_ten_entries()         
  {
      $this-&gt;db-&gt;get('property');
  }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>public function load_recent()
  {
      $data['info'] = $this-&gt;propertymodel-&gt;get_last_ten_entries();
      $this-&gt;load-&gt;view('load_property', $data);
  }
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>&lt;?
  echo $data['id'];
  ?&gt;
  </code></pre>
  
  <p>This is not working. Am sure i am doing something wrong because the error shown says </p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Notice</p>
    
    <p>Message: Undefined variable: data</p>
    
    <p>Filename: views/load_property.php</p>
    
    <p>Line Number: 2</p>
  </blockquote>
  
  <p>Property is a table in the database in which there is a field called id. what's going wrong?</p>
  
  <p>Thank you all</p>