The array is like this
Now want to do the following effect
Great gods, help me.
Reply content:
The array is like this
Now want to do the following effect
Great gods, help me.
Append array
The array_merge_recursive () function is the same as Array_merge () and can combine two or more numbers together to form an array of unions. The difference between the two is that when a key in an input array is already in the result array, the function takes a different approach. Array_merge () overrides the previously existing key/value pair, replacing it with the key/value pair in the current input array, and array_merge_recursive () merges two values together to form a new array with the original key as the array name. There is also the form of an array merge, which is a recursive append array. The form is:
Array_merge_recursive (array Array1,array array2[...,array Arrayn])
The program examples are as follows:
' $fruit 1 = array ("Apple" = "red", "banana" = "yellow");
$fruit 2 = Array ("pear" + "yellow", "apple" = "green");
$result = array_merge_recursive ($fruit 1, $fruit 2);
Print_r ($result);
Output
Array ([Apple] = Array ([0] = red [1] = = green) [Banana] = yellow [pear] = yellow) '
Array_merge
array_merge_recursive