PHP array_count_values returning an empty array -


Maybe I'm seeing something very obvious but this code does not work:

  & Lt; Pre & gt; & Lt ;? Php print_r (($ progress)); ? & Gt; & Lt ;? Php print_r (array_count_values ​​($ progress)); ? & Gt; & Lt; / Pre & gt;  

Outlook is:

  array ([0] => 1 [1] => 1 [2] = & gt; 1 [3] => 1 [4] => 1 [5] => 1 [6] => 1) Array ()  

What's here That's wrong? Why is empty_count_values ​​returning an empty array?

array_count_values ​​ works with only / Code> and integer values ​​my guess: you're accumulating booleans inside $ progress . You can put them at int before adding them to $ progress .


Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -