What Will Be The Output Of The Following Php Codep Pre Langphp #65
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $a = array("A", "Cat", "Dog", "A", "Dog"); print_r(array_count_values($a)); ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Array - PHP Array - Quiz No.4.
What will be the output of the following PHP code?
<?php $a = array("A", "Cat", "Dog", "A", "Dog"); print_r(array_count_values($a)); ?>
Array ( [A] => 2 [Cat] => 1 [Dog] => 2 )
Array ( [A] => 2 [Cat] => 2 [Dog] => 1 )
Array ( [A] => 1 [Cat] => 1 [Dog] => 2 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 1)