title: How to remove ALL duplicate values from an array in PHP?
body: <p>I want to check only the value [id] for duplicates, and remove all keys where this "field" [id] is a duplicate.</p>
  
  <p>Example: If I have numbers 1,2,1. I want the result to be 2, not 1,2. And criteria for duplicates is determined only by checking [id], not any other "field".</p>
  
  <p><strong>Original array:</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; John
              [id] =&gt; 123
              [color] =&gt; red
          )
  
      [1] =&gt; Array
          (
              [name] =&gt; Paul
              [id] =&gt; 958
              [color] =&gt; red
          )
  
      [2] =&gt; Array
          (
              [name] =&gt; Jennifer
              [id] =&gt; 123
              [color] =&gt; yellow
          )
  )
  </code></pre>
  
  <p><strong>The result I want:</strong></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; Paul
              [id] =&gt; 958
              [color] =&gt; red
          )
  
  )
  </code></pre>