Sail E0 Webinar
Question
What will be the output of the following PHP code?
< ?php
$fruits = array ("mango", "apple", "pear", "peach");
$fruits = array_flip($fruits);
echo ($fruits[0]);
?>
Options:
A .  mango
B .  Error
C .  peach
D .  0
Answer: Option B


As we are flipping the values, $fruits["mango"] = 0, $fruits["apple"] = 1 and so on.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers