-
What will be the output of the following PHP code?
<?php
$num = array ("Zero","One", "Two", "Three", "Four","Five");
$subset = array_slice ($num, 2);
print_r ($subset);
?>
-
-
Array
(
[0] => Two
[1] => Three
) -
Array
(
[0] => Two
[2] => Four
[3] => Five
) -
Array
(
[2] => Four
[3] => Five
) -
Array
(
[0] => Two
[1] => Three
[2] => Four
[3] => Five
) - None of these
-
Correct Option: D
The array_slice() function returns a section of an array based on a starting and ending offset value.