Question:$states = array("Ohio", "Iowa", "Arizona", "Iowa", "Ohio"); $stateFrequency = array_count_values($states); print_r($stateFrequency); This returns the following: 

A Array ( [Ohio] => 2 [Iowa] => 2 [Arizona] => 2 ) 

B Array ( [Ohio] => 2 [Iowa] => 2 [Arizona] => 1 ) 

C Array ( [Ohio] => 2 [Iowa] => 1 [Arizona] => 1 ) 

D Array ( [Ohio] => 2 [Iowa] => 1 [Arizona] => 2 ) 

+ Answer
+ Report
Total Preview: 776

Copyright © 2024. Powered by Intellect Software Ltd