Sail E0 Webinar
Question
What will be the output of the following PHP code?
< ?php
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));
?>
Options:
A .  orangebanana
B .  appleorange
C .  orangeorange
D .  appleapple
Answer: Option A


The next() function returns the array value residing at the position immediately following that of the current array pointer.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers