1.

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

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


Discussion

No Comment Found