title: Codeigniter/PHP: Format db query as an array
body: <pre><code>    $this-&gt;db-&gt;select('id, user_id')-&gt;from('be_users')-&gt;where('id',$user_id);
      $data['user_individual'] = $this-&gt;db-&gt;get();
  </code></pre>
  
  <p>If this is my db query, how do I get an array of one db row...</p>
  
  <p>ie. I want to do something like <code>$data['user_individual']['id']-&gt;format_as_array</code>...</p>