PHP array_slice() Function

The array_slice() function returns selected parts of an array.The array_slice() function returns the sequence of elements from the array array as specified by the starting_position and slice_length parameters.

Example -

Example -