<?php
$input= array(10,101,21,01,11,12,12131,14,115,51,51);

$count_values = array();

foreach ($input as $a) {
   $count_values[$a]++;
}

echo 'Duplicates count: '.count($count_values);
print_r($count_values);

?>
Leave a Comment