With the preserve parameter set to true:


SUBMITTED BY: henry1874w

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

FORMAT: Text only

SIZE: 95 Bytes

HITS: 1019

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

comments powered by Disqus