Menu Riverview Church

ARRAY_REPLACE

Replaces elements from passed arrays into the first array

SYNTAX

array_replace ( array $array1 [, array $... ] ) : array

PARAMETERS

array1

The array in which elements are replaced.

...

Arrays from which elements will be extracted. Values from later arrays overwrite the previous values.

RETURN

Returns an array, or NULL if an error occurs.

EXAMPLES

ARRAY1

Array
(
    [0] => 0
    [1] => 1
    [2] => Array
        (
            [0] => 0
            [1] => 1
        )

)

...

Array
(
    [0] => replace
    [1] => 1
    [2] => Array
        (
            [0] => replace
        )

)

PHP