array_slice : array_slice « Data Structure « PHP






array_slice

 
<?php

   $states = array("Alabama", "Alaska", "Arizona");
   $subset = array_slice($states, 4);
   print_r($subset);

?>
  
  








Related examples in the same category

1.Extracting a Portion of an Array: array array_slice(array $array, int $offset[, int $length[, bool $preserve]] )
2.Extract a slice of the array