title: Combining arrays based on array values?
body: <p>I have an array of images:</p>
  
  <pre><code>array(
      array('title'=&gt; 'img_one', 'width' =&gt; 100),
      array('title'=&gt; 'img_two', 'width' =&gt; 200)
      //etc
  )
  </code></pre>
  
  <p>I also have an array of widths and heights.</p>
  
  <pre><code>array(
      array('w'=&gt;100, 'h' =&gt; 100),
      array('w'=&gt;200, 'h' =&gt; 999)
  )
  </code></pre>
  
  <p>I need to run through the first array and where a width matches in the first and second array, add the height to the first array, so I get something like:</p>
  
  <pre><code>array(
      array('title'=&gt; 'img_one', 'width' =&gt; 100, height=&gt;100),
      array('title'=&gt; 'img_two', 'width' =&gt; 200, height=&gt;999)
  )
  </code></pre>
  
  <p>Other than the obvious creating a loop and checking values against values, is there an easier way to achieve this?</p>