Q:

What will be the output of the following PHP code?

0

What will be the output of the following PHP code?

<?php
    $fruits = array ("apple", "mango", "peach", "pear",
    "orange");
    $subset = array_splice ($fruits, 2);
    print_r ($fruits);
    ?>

  1. Error
  2. Array ( [0] => apple [1] => mango [2] => peach )
  3. Array ( [0] => apple [1] => mango )
  4. Array ( [0] => pear [1] => orange )

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(c).Array ( [0] => apple [1] => mango )

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now