PHP - 将2个数组的值连接成1个新数组

I have 2 separate multidimensional arrays that have the same structure. Example:

Array
(
    [0] => Array
        (
            [uploadData] => 1234 Main St
        )

    [1] => Array
        (
            [uploadData] => 5678 Elm St
        )

    [2] => Array
        (
            [uploadData] => 9879 New St
        )

    [3] => Array
        (
            [uploadData] => 9876 Shady Lane
        )

)

Array
(
    [0] => Array
        (
            [uploadData] => Orlando
        )

    [1] => Array
        (
            [uploadData] => Tampa
        )

    [2] => Array
        (
            [uploadData] => Miami
        )

    [3] => Array
        (
            [uploadData] => West Palm Beach
        )

)

I just need to get them into 1 new array that looks like this:

Array
(
    [0] => Array
        (
            [uploadData] => 1234 Main St Orlando
        )

    [1] => Array
        (
            [uploadData] => 5678 Elm St Tampa
        )

    [2] => Array
        (
            [uploadData] => 9879 New St Miami
        )

    [3] => Array
        (
            [uploadData] => 9876 Shady Lane West Palm Beach
        )

)

I've been trying to use array_merge but I cannot get it to work.

Simple, recursive, key-independent solution:

function array_concat_recursive($array1, $array2){
    $result = array();
    foreach($array1 as $key => $value){
        if(isset($array2[$key])){
            if(is_array($value)){
                $result[$key] = array_concat_recursive($value, $array2[$key]);
            }else{
                $result[$key] = $value . ' ' . $array2[$key];
            }
        }
    }
    return $result;
}

Assuming that:

  1. Your first array is assigned to a variable called $address
  2. Your second array is assigned to a variable called $city
  3. There are ALWAYS exact matches between the two arrays

EDIT:
Great catch by @dev-null-dweller - edited to catch full depth of arrays.

NOTE
Example code in question does not have quotes around uploadData key, so that is replicated here:

The following will do what you want:

foreach($address as $key=>$value) {
    $newarray = array(
         'uploadData'=>$value['uploadData'] . ' ' . $city[$key]['uploadData'];
    );
}

The $newarray will contain an array structured per your request.

Fetch from both arrays until everything is gone:

$final = [];
$key   = 'uploadData';
while ($array1 && $array2)
{
    $final[][$key] = array_shift($array1)[$key] . ' ' . array_shift($array2)[$key];
}

See array_shift and converting to booleans.