ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

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

Answer & Solution
Correct Answer: Option C
The array_flip() function flips/exchanges all keys with their associated values in an array.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.