Start the slice from the third array element, and return the rest of the elements in the array:


SUBMITTED BY: henry1874w

DATE: June 25, 2017, 2:50 p.m.

FORMAT: Text only

SIZE: 88 Bytes

HITS: 567

  1. <?php
  2. $a=array("red","green","blue","yellow","brown");
  3. print_r(array_slice($a,2));
  4. ?>

comments powered by Disqus