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() function syntax

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:

< td width="301" valign="top" style="word-break: break-all;">Description< /tr>< /tbody>
Parameters
array1Required, specify array
array2Optional, specify array
array3Optional, specify array

php array_merge_recursive() function example





"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