title: wordpress $wpdb select results to an array
body: <p><code>$wp-&gt;get_results</code> will return an array and formats the array depends if the second parameter is specified; if not, it is default to an object, right? But my question is it possible to retrieve results then store it the an array? Like this <code>$arr = array(1,2,3,4,5)</code>? What my main concern is this.. I want to search in the array if the value is present.</p>
  
  <p>Now I can't do a <code>in_array</code> if the returned results is like this.</p>
  
  <pre><code>$arr = array(array('1'), array('2'), array('3'), array('4'), array('5'));
  </code></pre>
  
  <p>Any help would be much appreciated. Thanks.</p>
  
  <p>EDITED</p>
  
  <p>my <code>$arr</code> would look like this</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ( [code] =&gt; 8 [id] =&gt; ) [1] =&gt; stdClass Object ( [code] =&gt; 1 [id] =&gt; ) )
  </code></pre>
  
  <p>EDITED</p>
  
  <p>Found a solution:</p>
  
  <pre><code>if (in_array(array('1'), $arr) {
    // found value
  }
  </code></pre>