title: Creating an associative array from Wordpress $wpdb->get_results
body: <p>It's been a long day and for some reason this is totally eluding me...</p>
  
  <p>My Wordpress database request looks like this:</p>
  
  <pre><code>$results = $wpdb-&gt;get_results($sql);
  </code></pre>
  
  <p>And the output looks like this</p>
  
  <pre><code>Array ( [0] =&gt; stdClass Object ([id] =&gt; 2 [organisation] =&gt; Company 2 ) 
          [1] =&gt; stdClass Object ([id] =&gt; 1 [organisation] =&gt; Company 1 ) 
  )
  </code></pre>
  
  <p>I need to turn it into an array that looks like this:</p>
  
  <pre><code>Array ([1] =&gt; Company 1, [2] =&gt; Company 2)
  </code></pre>
  
  <p>This must be dead easy, but I just can't see it for some reason...Grateful for any pointers...</p>