PHP array_splice() Function
The array_splice() function removes and optionally replaces elements from an array.
Syntax
array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []): array
Try It Online
Output
Click Run to execute your code
Enjoying these tutorials?