array_splice

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

Description

array array_splice ( array input, int offset [, int length [, array replacement]])

 
array_push

 
(

 
$input

 
,

 
$x

 
,

 
$y

 
)

 
array_splice

 
($input

 
,

 
count

 
($input)

 
,

 
0

 
,

 
array

 
($x

 
,

 
$y)

 
)

 
array_pop

 
($input

 
)

 
array_splice

 
($input

 
,

 
-1

 
)

 
array_shift

 
($input

 
)

 
array_splice

 
($input

 
,

 
0

 
,

 
1

 
)

 
array_unshift

 
($input

 
,

 
$x

 
,

 
$y

 
)

 
array_splice

 
($input

 
,

 
0

 
,

 
0

 
,

 
array

 
($x

 
,

 
$y)

 
)

 
$a[$x

 
]

 
=

 
$y

 
array_splice

 
($input

 
,

 
$x

 
,

 
1

 
,

 
$y

 
)





דוגמה 1 . array_splice( ) examples