1: 2: 3: 4:
<?php $array = array (1, "hello", 1, "world", "hello"); print_r(array_count_values ($array)); ?>