title: Codeigniter: Can I return multiple values from the same function?
body: <p>I would like to return the query results along w/ the row count without having to run multiple queries. Is this possible in Codeigniter? The following works for returning the query results, but is it possible to also count the number of entries found?</p>
  
  <p>Controller:</p>
  
  <pre><code>$data['records'] = $this-&gt;item_model-&gt;searchItem($item_name);
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>$query = $this-&gt;db-&gt;query($sql, array($this-&gt;user_id, '%'.$item_name.'%'));
  return $query-&gt;result();
  </code></pre>