title: converting array of objects to simple array
body: <p>I have an array of objects, each object consists of an id and an organisation.  It looks like this</p>
  
  <pre><code>Array ( 
    [0] =&gt; stdClass Object ( 
        [id] =&gt; 2 [organisation] =&gt; org1
    )   
    [1] =&gt; stdClass Object ( 
        [id] =&gt; 4 [organisation] =&gt; org2
     ) 
    [2] =&gt; stdClass Object ( 
        [id] =&gt; 1 [organisation] =&gt; org3
    ) 
  ) 
  </code></pre>
  
  <p>I need to convert it into a simple associative array ([id]=>organisation,...) so the above example would look like this</p>
  
  <pre><code>Array (
      [2] =&gt; org1
      [4] =&gt; org2
      [1] =&gt; org3
  )
  </code></pre>
  
  <p>Greatful for any thoughts</p>