Skip to content
Chung Leong edited this page Jan 10, 2022 · 4 revisions

array_slice - Extract a slice of the array

array array_slice ( array $array, int32 offset [, int32 length] )

array_slice() returns the sequence of elements from array as specified by offset and length.

Parameters:

array - The input array.

offset - The offset

length - The number of elements to return. If it is omitted, then the sequence will have everything from offset up until the end of the array.

Return Value:

The slice specified.

Version

1.0 and above.

Clone this wiki locally