PHP » PYTHON |
login |
register |
about
|
PYTHON array_splice
is this article helpful?
|
Python replacement for PHP's array_splice
[
edit
| history
]
myList[offset : offset+length] = replacement # without replacement: del myList[offset : offset+length] array_splice(PHP 4, PHP 5) array_splice — Remove a portion of the array and replace it with something else DescriptionRemoves the elements designated by offset and length from the input array, and replaces them with the elements of the replacement array, if supplied. Note that numeric keys in input are not preserved.
Parameters
Return ValuesReturns the array consisting of the extracted elements. Examples
Example #1 array_splice() examples
<?php
Example #2 array_splice() examples The following statements change the values of $input the same way:
<?php
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|