ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

What will be the output of the following PHP code?
<?php
$a1 = array("red", "green");
$a2 = array("blue", "yellow");
$a3 = array_merge($a1, $a2);
$a4 = array("a", "b", "c", "d");
$a = array_combine($a4, $a3);
print_r($a);
?>

Answer & Solution
Correct Answer: Option D
Basic combined application of array_combine() and array_merge().
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.