What will be the output of the following PHP code?
<?php
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));
?>
<?php
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));
?>
A. orangebanana
B. appleorange
C. orangeorange
D. appleapple
Answer: Option A
Solution(By Examveda Team)
The next() function returns the array value residing at the position immediately following that of the current array pointer.Related Questions on Arrays
A. karnataka 11,35,000
B. 11,35,000
C. population 11,35,000
D. karnataka population
Which function will return true if a variable is an array or false if it is not?
A. this_array()
B. is_array()
C. do_array()
D. in_array()
Join The Discussion