title: How to extract key=>value pairs from this array
body: <p>I have this array</p>
  
  <pre><code>[InstrumentCategory] =&gt; Array
                  (
                      [0] =&gt; Array
                          (
                              [id] =&gt; 4
                              [title] =&gt; Training
                              [InstrumentsCategory] =&gt; Array
                                  (
                                      [id] =&gt; 56
                                      [instrument_id] =&gt; 28
                                      [category_id] =&gt; 4
                                  )
  
                          )
  
                      [1] =&gt; Array
                          (
                              [id] =&gt; 8
                              [title] =&gt; Working time flexibility
                              [InstrumentsCategory] =&gt; Array
                                  (
                                      [id] =&gt; 57
                                      [instrument_id] =&gt; 28
                                      [category_id] =&gt; 8
                                  )
  
                          )
  
                      [2] =&gt; Array
                          (
                              [id] =&gt; 16
                              [title] =&gt; Income support for workers
                              [InstrumentsCategory] =&gt; Array
                                  (
                                      [id] =&gt; 55
                                      [instrument_id] =&gt; 28
                                      [category_id] =&gt; 16
                                  )
  
                          )
  
                  )
  </code></pre>
  
  <p>Is there any other way to extract id=>value pairs (note that <code>id</code> in this case is a key in the sub-arrays) than a <code>for</code> loop?</p>
  
  <p>Thanks in advance</p>