Skip to content

CodeLouisville/php-exercise-array-histogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Array Histogram

For this PHP code exercise, create a file named histogram.php. This file should contain a function named histogram() which accepts one parameter. This parameter must be an array.

Given an array, histogram() will return an associative array of values from the given array as keys and their count as value.

For example, given ['a', 'a', 'b', 4], histogram() should return ['a' => 2, 'b' => 1, 4 => 1].

Note: for this exercise, you can assume that all values within the given array are integers or strings.

Just getting started?

Review the PHP Code Exercises documentation for more details on performing code exercises.

Need help?

Jump on the PHP channel in Slack and ask your fellow students and mentors for a hint.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages