What Will Be The Output Of The Following Php Codep Pre Langphp #77
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $fruits = array ("apple", "mango", "peach", "pear", "orange"); $subset = array_slice ($fruits, 2); print_r ($subset); ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Array - PHP Array - Quiz No.5.
What 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); ?>
Array ( [0] => peach )
Array ( [0] => apple [1] => mango [2] => peach )
Array ( [0] => apple [1] => mango )
Array ( [0] => peach [1] => pear [2] => orange )