title: php check array value for duplicate
body: <p>i have this below array:</p>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$arr=array('A','A','B','C');
  </code></pre>
  
  <p>i want to check value and if values are duplicate must be alert error</p>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$chk=array_count_values($array);
  if ( $chk[0] &lt; 1 || $chk[2] &lt; 1 || $chk[3] &lt; 1  || $chk[4] &lt; 1 )
      echo 'array must be uniq';
  </code></pre>