Gen. partnerAlgotech

PHP funkce array_splice()

Remove a portion of the array and replace it with something else

|
11. září 2019

Dostupnost ve verzích: PHP 4.0

Remove a portion of the array and replace it with something else

Parametry

Parametr Datový typ Výchozí hodnota Poznámka
$input array není The input array.
$offset int není If offset is positive then the start of removed portion is at that offset from the beginning of the input array. If offset is negative then it starts that far from the end of the input array.
$length int null, If length is omitted, removes everything from offset to the end of the array. If length is specified and is positive, then that many elements will be removed. If length is specified and is negative then the end of the removed portion will be that many elements from the end of the array. Tip: to remove everything from offset to the end of the array when replacement is also specified, use count($input) for length.
$replacement mixed null If replacement array is specified, then the removed elements are replaced with elements from this array.

array

the array consisting of the extracted elements.

Další zdroje

Oficiální dokumentace funkce array-splice

Načítání komentářů...

Zůstaňte v obraze

Přihlaste se k odběru našeho newsletteru a získejte nejnovější informace o kybernetické bezpečnosti přímo do vaší e-mailové schránky.

Vaše údaje jsou v bezpečí. Newsletter můžete kdykoliv odhlásit.