ninja_forms_array_merge_recursive

The Ninja Forms ninja forms array merge recursive function.

Description

ninja_forms_array_merge_recursive(); 

Usage

  1. if ( !function_exists( 'ninja_forms_array_merge_recursive' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/ajax.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_array_merge_recursive(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/admin/ajax.php  
  1. function ninja_forms_array_merge_recursive() { 
  2. $arrays = func_get_args(); 
  3. $base = array_shift($arrays); 
  4.  
  5. foreach ($arrays as $array) { 
  6. reset($base); //important 
  7. while (list($key, $value) = @each($array)) { 
  8. if (is_array($value) && @is_array($base[$key])) { 
  9. $base[$key] = ninja_forms_array_merge_recursive($base[$key], $value); 
  10. } else { 
  11. $base[$key] = $value; 
  12.  
  13. return $base;