title: How to find duplicated values in PHP arrays?
body: <p>I have an array like this</p>
  
  <pre><code>$a=array(0=&gt;1,1=&gt;1,2=&gt;5,3=&gt;5,4=&gt;10)
  </code></pre>
  
  <p>Now I want to find out the duplicate values and add those in to an array like this:</p>
  
  <pre><code>array_push($arrayOfones,$a['0'],$a['1'];
  array_push($arrayOfFive,$a['2'],$a['5'];
  </code></pre>