Extract a slice of the array
<?
$input = array ("a", "b", "c", "d", "e");
$output = array_slice ($input, 2);
$output = array_slice ($input, 2, -1);
$output = array_slice ($input, -2, 1);
$output = array_slice ($input, 0, 3);
?>
Related examples in the same category