slice()
The slice() method returns an array with selected from start to end
Example.php
Syntax
Parameter
Zero-based index at which to start extraction.
Default is
0
.Zero-based index at which to start extraction.
Default is
count($array)
.When set to
TRUE
keys will be preserved. Default isFALSE
which will re-index the chunk numerically
Return value
A sliced array.
Prefixing
References
Last updated