Programming Language Arrays in PHP MCQ Question #2384
Single Choice Not Set

QWhat will be the output of the following PHP code?
< ?php 
    $fruits = array ("apple", "orange", "banana");
    echo (next($fruits));	
    echo (next($fruits));
?>

ID: #2384 Arrays in PHP MCQ 1,093 views
Question Info
#2384Q ID
Not SetDifficulty
Arrays in PHP MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A orangebanana
  • B appleorange
  • C orangeorange
  • D appleapple
Correct Answer

Explanation

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

Share This Question

Challenge a friend or share with your study group.