The function array_merge_recursive_overrule is used to merge two or more arrays into a single array. If more than one array has the same key, the value of the last array in the argument list will overrule the previous values. This function overrules the values recursively, which means that it will merge sub-arrays as well.
In this example, we have two arrays to merge: $input1 and $input2. The result array $result will have the color favorite value overridden by the $input2 array value.
Array ( [color] => Array ( [favorite] => blue [secondary] => green )
)
In this example, we have two arrays to merge: $input1 and $input2. The result array $result will have the color favorite value overridden by the $input2 array value, but the secondary color value will remain the same.
In conclusion, t3lib_div is a PHP library that provides various useful functions, one of which is array_merge_recursive_overrule. This function merges arrays and overrules values recursively.
PHP t3lib_div::array_merge_recursive_overrule - 30 examples found. These are the top rated real world PHP examples of t3lib_div::array_merge_recursive_overrule extracted from open source projects. You can rate examples to help us improve the quality of examples.