1.

What will be the output of the following PHP code?
 <?php $a = array("A", "Cat", "Dog", "A", "Dog"); print_r(array_count_values($a)); ?>  

A. Array ( [A] =&gt; 2 [Cat] =&gt; 1 [Dog] =&gt; 2 )
B. Array ( [A] =&gt; 2 [Cat] =&gt; 2 [Dog] =&gt; 1 )
C. Array ( [A] =&gt; 1 [Cat] =&gt; 1 [Dog] =&gt; 2 )
D. Array ( [A] =&gt; 2 [Cat] =&gt; 1 [Dog] =&gt; 1)
Answer» B. Array ( [A] =&gt; 2 [Cat] =&gt; 2 [Dog] =&gt; 1 )


Discussion

No Comment Found