?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$a = array("A", "Cat", "Dog", "A", "Dog");
print_r(array_count_values($a));
?>
<?php
$a = array("A", "Cat", "Dog", "A", "Dog");
print_r(array_count_values($a));
?>
Answer & Solution
Correct Answer:
Option
A
The array_count_values() function counts all the values of an array.
Join the Discussion
Login to post a comment or share your explanation.
Login