Its syntax is: array array_count_values (array array); <? $states = array("OH", "OK", "CA", "PA", "OH", "OH", "PA", "AK"); $state_freq = array_count_values($states); print_r( $state_freq ); ?>