-
What will be the output of the following PHP code?
<?php
$First = array("Rahul","Ajit","Ats","Rahul","Ats","Sujit");
$Second = array("Rahul","Rahul","Ajit","Rahul","Aju","Sujit");
$Third = array_combine($First,$Second);
print_r(array_count_values($Third));
?>
-
- Error
-
Array
(
[Rahul]
[Aju]
[Sujit]
) -
Array
(
[Rahul] => 2
[Aju] => 1
[Sujit] => 1
) - Nothing
- None of these
Correct Option: C
The array_count_values() function counts all the values of an array and array_combine() combines arrays.