Single Choice
Not Set
QWhat will be the output of the following PHP code?
< ?php
$fruits = array ("apple", "mango", "peach", "pear",
"orange");
$subset = array_slice ($fruits, 2);
print_r ($subset);
?>
ID: #2391
Arrays in PHP MCQ
911 views
Question Info
#2391Q 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
The array_slice() function returns a section of an array based on a starting and ending offset value.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic