array_splice
array_splice — Remove a portion of the array and replace it with something else.Description
array_splice( array &$array,Removes the elements designated by offset and length from the array array, and replaces them with the elements of the replacement array, if supplied.
int $offset,
?int $length = null,
mixed $replacement = [] ): array
Parameters
array
The array to work on.
offset
The offset to start removing elements from.
length
The number of elements to remove. If not supplied, removes all elements from offset to the end of the array.
replacement
The elements to replace the removed elements with. If not supplied, replaces the removed elements with null.
Return Values
Returns an array consisting of the extracted elements.More information about array_splice on official PHP documentation site
array_splice - Popular snippets
- PHP 8.0 / MySQL 5.7 array_splice var_dump
last run:
2021-08-11 07:13:40
8
- PHP 7 / MySQL 5.7 explode array_merge array_splice print_r
last run:
2022-02-17 14:46:08
3
- PHP 8.0 / MySQL 5.7 print_r array_merge array_splice
last run:
2022-01-13 15:26:53
3
- PHP 8.0 / MySQL 5.7 range array_splice implode array_slice range array_splice implode array_slice
last run:
2022-04-22 20:47:16
1
- PHP 7 / MySQL 5.7 str_ireplace explode array_splice implode print_r
last run:
2022-02-17 15:00:06
1
- PHP 7 / MySQL 5.7 str_ireplace explode array_splice implode array_merge print_r
last run:
2022-02-17 14:58:41
1
- PHP 7 / MySQL 5.7 str_ireplace explode array_splice array_merge print_r
last run:
2022-02-17 14:56:42
1
- PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
last run:
2022-02-17 14:53:55
1
- PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
last run:
2022-02-17 14:51:47
1
array_splice - New snippets
-
PHP 8.0 / MySQL 5.7 range array_splice implode array_slice range array_splice implode array_slice
added at:
2022-04-22 20:47:16
1
-
PHP 7 / MySQL 5.7 str_ireplace explode array_splice implode print_r
added at:
2022-02-17 15:00:06
1
-
PHP 7 / MySQL 5.7 str_ireplace explode array_splice implode array_merge print_r
added at:
2022-02-17 14:58:41
1
-
PHP 7 / MySQL 5.7 str_ireplace explode array_splice array_merge print_r
added at:
2022-02-17 14:56:42
1
-
PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
added at:
2022-02-17 14:53:55
1
-
PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
added at:
2022-02-17 14:51:47
1
-
PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
added at:
2022-02-17 14:51:38
1
-
PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
added at:
2022-02-17 14:50:50
1
-
PHP 7 / MySQL 5.7 explode array_splice count str_ireplace array_merge print_r
added at:
2022-02-17 14:50:36
1