title: codeigniter flatten array of query result
body: <p>I'm using a query in Codeigniter to return the ids of all the rows that belong to a user. </p>
  
  <pre><code>$this-&gt;db-&gt;select('id');
  $this-&gt;db-&gt;where('user_id', 99);
  $query = $this-&gt;db-&gt;get('my_table');
  return $query-&gt;result_array();
  </code></pre>
  
  <p>This returns </p>
  
  <pre><code>Array ( [0] =&gt; Array ( [id] =&gt; 8 ) [1] =&gt; Array ( [id] =&gt; 7 ) [2] =&gt; Array ( [id] =&gt; 6 ) )
  </code></pre>
  
  <p>Is it possible to return a flat array like </p>
  
  <pre><code>Array ( [0] =&gt; 8 [1] =&gt; 6 [2] =&gt; 7 )
  </code></pre>
  
  <p>?</p>