return multiple values inside function method in codeigniter
<p>This is my query counting rows in <code>tblapplication</code></p>

<pre><code>public function countallrecord() {
    $query = $this-&gt;db-&gt;get('tblapplication');

    return $query-&gt;num_rows();  
}
</code></pre>

<p>and this is the function to get all the data</p>

<pre><code>public function getdata() {
    $query = $this-&gt;db-&gt;get('tblapplication');

    return $query-&gt;result();
}
</code></pre>

<p>Is there any way I can make this code on one function</p>

<p>I'm trying to pass it here:</p>

<pre><code>public function Countandviewallrecord() {
    // returns both rows and count
}
</code></pre>