|
array_sliceExtract a slice of the array Description
array array_slice
( array
$array
, int $offset
[, int $length = NULL
[, bool $preserve_keys = false
]] )
array_slice returns the sequence of elements
from the array Parameters
Return ValuesReturns the slice. If the offset is larger than the size of the array then returns an empty array. Changelog
Examples
Example #1 array_slice examples
<?php The above example will output: Array ( [0] => c [1] => d ) Array ( [2] => c [3] => d ) See Also
|