Skip to content

A::merge()

Merges arrays recursively

A::merge(array $array1, array $array2, int $mode = 1): array

Parameters

Name Type Default Description
$array1 * array
$array2 * array
$mode int 1 Behavior for elements with numeric keys;
A::MERGE_APPEND: elements are appended, keys are reset;
A::MERGE_OVERWRITE: elements are overwritten, keys are preserved
A::MERGE_REPLACE: non-associative arrays are completely replaced

Return type

array

Parent class

Kirby\Toolkit\A