I have an array ($myArray) which looks like this:
Array (
[0] => 2001
[1] => 2002
[2] => 2003
[3] => 2004
[4] => 2005
[5] => 2006
[6] => 2007
etc etc
When I use
$occurences = array_count_values($myArray)
I get
Array (
[2001] => 5
[2002] => 7
[2003] => 7
[2004] => 7
[2005] => 7
[2006] => 2
[2007] => 6 )
When I try to index using
echo $occurences[0];
I get an error of
Undefined offset: 0