You are here

function _custom_formatters_array_merge_recursive in Custom Formatters 6

1 call to _custom_formatters_array_merge_recursive()
theme_custom_formatters_preview in ./custom_formatters.admin.inc

File

./custom_formatters.admin.inc, line 1045
Contains administration functions for the Custom Formatters module.

Code

function _custom_formatters_array_merge_recursive() {
  $args = func_get_args();
  $a = array_shift($args);
  foreach ($args as $b) {
    foreach ($b as $key => $val) {
      if (is_array($val) && isset($a[$key]) && is_array($a[$key])) {
        $b[$key] = _custom_formatters_array_merge_recursive($a[$key], $val);
      }
    }
    $a = array_merge($a, $b);
  }
  return $a;
}