Single Choice
Not Set
QWhat will be the output of the following PHP code?
< ?php
$fruits = array ("mango", "apple", "pear", "peach");
$fruits = array_flip($fruits);
echo ($fruits[0]);
?>
ID: #2381
Arrays in PHP MCQ
1,002 views
Question Info
#2381Q ID
Not SetDifficulty
Arrays in PHP MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
As we are flipping the values, $fruits["mango"] = 0, $fruits["apple"] = 1 and so on.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic