September 2001
Intermediate to advanced
768 pages
32h 45m
English
array array_splice(array array, int offset, [int length], [array replacement])
| array | Array to act on |
| offset | Starting element index |
| length | Length of segment to replace |
| replacement | Array of replacement elements |
Replaces part of an array with another array.
Returns:
Array of elements deleted from the original array; NULL on failure
Description:
This function deletes the elements of array starting at the position given by offset . If offset is positive, it gives the number of elements from the beginning of array from which to start deleting; if negative, it gives the number of elements from the end at which to start deleting.
array is altered in place, and an array containing the deleted elements is returned.
If length is given ...
Read now
Unlock full access