slice()
The slice() method returns an array with selected from start to end
Last updated
The slice() method returns an array with selected from start to end
Last updated
$start
Zero-based index at which to start extraction.
Default is
0
.
$end
Zero-based index at which to start extraction.
Default is
count($array)
.
$preserveKeys
When set to TRUE
keys will be preserved.
Default is FALSE
which will re-index the chunk numerically
A sliced array.