Use either of the built-in array functions:
array_merge_recursive
or array_replace_recursive
More Related Contents:
- PHP add elements to multidimensional array with array_push
- Merge row data from multiple arrays
- Merge two indexed arrays of indexed arrays based on first column value
- Merge two 2d arrays by shared column value
- HTML Table parsing in PHP Error
- Filter/Remove rows where column value is found more than once in a multidimensional array
- Submitting a multidimensional array via POST with php
- Sorting a php array of arrays by custom order
- Filter multidimensional array based on partial match of search value
- How do I sort a multidimensional array by one of the fields of the inner array in PHP? [duplicate]
- String with array structure to Array [duplicate]
- Implode a column of values from a two dimensional array [duplicate]
- Recursively remove empty elements and subarrays from a multi-dimensional array
- Checking if array is multidimensional or not?
- How to merge transparent PNG with image using PHP?
- Unset a column in a multidimensional array
- Can I use array_push on a SESSION array in php?
- Dynamic array keys
- Merge XML files in PHP
- Merge arrays of associative arrays by shared column values
- Compare two 2D arrays & get intersection and differences
- Group 2d array data using column value to create a 3d array
- Group array values based on key in php? [duplicate]
- PHP – Sort multi-dimensional array by another array
- How to create multi-dimensional array from a list?
- Recreate original PHP array from print_r output [duplicate]
- Group 2d array’s row data by one column and sum another column within each group to produce a reduced 2d array
- Rename key in each row of a 2d array
- Filter rows of a 2d array by the rows in another 2d array
- Group rows in a 2d array and count number of rows in each respective group