ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

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));
?>

Answer & Solution
Correct Answer: Option A
The array_count_values() function counts all the values of an array and array_combine() combines arrays.
Examveda
Question posted by Examveda
Community

Join the Discussion

2 Comments
Kalam Ahmed
Kalam Ahmed 2 years ago
[A] => 2
[Tiger] => 1
CS VN
CS VN 5 years ago
bad webside;
[A] => 2
[Tiger] => 1