title: PHP compare array results and filter
body: <p>I have a php array that looks like this:</p>
  
  <pre><code>Array(
  [3086] =&gt; Array
      (
          [id] =&gt; 3086
          [note] =&gt; Make text larger
          [revision] =&gt; 1
          [noteParentId] =&gt; 1706
      )
  
  [3087] =&gt; Array
      (
          [id] =&gt; 3087
          [note] =&gt; Make text larger
          [revision] =&gt; 2
          [noteParentId] =&gt; 1706
      )
  
  [3085] =&gt; Array
      (
          [id] =&gt; 3085
          [note] =&gt; Enlarge this image
          [revision] =&gt; 1
          [noteParentId] =&gt; 1705
      )
  
  [3084] =&gt; Array
      (
          [id] =&gt; 3086
          [note] =&gt; Another test note
          [revision] =&gt; 1
          [noteParentId] =&gt; 1704
      )
  
  )
  </code></pre>
  
  <p>How can I filter it in such a way that if the <code>[noteParentId]</code> has the same value (as seen in <code>[3086]</code> and <code>[3087]</code>), then remove the one with the lower <code>[revision]</code> value from the array?</p>