Maybe I missed something really obvious but this code doesn’t work:
<pre>
<?php print_r(($progress)); ?>
<?php print_r(array_count_values ($progress)); ?>
</pre>
The output is this:
Array
(
[0] => 1
[1] => 1
[2] => 1
[3] => 1
[4] => 1
[5] => 1
[6] => 1
)
Array
(
)
what is wrong here? why array_count_values returning an empty array?
array_count_valuesonly works withstringandintegervalues. My guess: you are storingbooleansinside$progress. You could cast them tointbefore adding them to$progress.