title: codeigniter assigning values got from model to variables in controller
body: <p>I use Codeigniter and I want to return user_id and name from model and then use them as variables in controller but not sure if I correctly values to variables in controller. Could you please have a look at my code.</p>
  
  <p>model:</p>
  
  <pre><code>if ($query-&gt;num_rows() == 1) {            
      $row = $query-&gt;row();
      return array('user_id' =&gt; $row-&gt;user_id, 'name' =&gt; $row-&gt;name);
  }
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>$user_id = $this-&gt;model_users-&gt;get_user_id_name($email);
  $user_name = $this-&gt;model_users-&gt;get_user_id_name($email);
  </code></pre>