php array_merge_recursive() function
Translation results:
merge
English [mɜ:dʒ] American [mɜ:rdʒ]
vt.& vi. Integrate; (make ) mix; blend; gradually disappear into something
Third person singular: merges Present participle: merging Past tense: merged Past participle: merged
recursive
English [rɪˈkɜ:sɪv] American [rɪˈkɜ:rsɪv]
adj. Regressive, recursive
php array_merge_recursive() functionsyntax
Function:Merge two arrays into one array
Description:The array_merge_recursive() function merges one or more arrays into one array. The difference between this function and the array_merge() function is when two or more array elements have the same key name. array_merge_recursive() does not perform key name overwriting, but recursively combines multiple values with the same key name into an array.
Syntax:array_merge_recursive(array1,array2,array3...)
Parameters:
Parameters | < td width="301" valign="top" style="word-break: break-all;">Description|
array1 | Required, specify array | < /tr>
array2 | Optional, specify array |
array3 | Optional, specify array |
php array_merge_recursive() functionexample
"red","b"=>"green"); $a2=array("c"=>"blue","b"=>"yellow"); print_r(array_merge_recursive($a1,$a2)); ?>
Run instance»
Click "Run instance" Button to view online examples
Popular Recommendations
- Detailed explanation of the usage of PHP's array_merge_recursive () function
- Introduction to how to use the PHP array_merge_recursive() function
- Solution to PHP Warning: Invalid argument supplied for array_merge_recursive()
- Simple and clear method to use PHP array_merge_recursive() function
- How to use the array_merge_recursive() function of PHP array merging?
- Introduction to how to use the array_merge_recursive() function in the PHP function library