php - how to merge 2d array that have different no of element for each array

后端 未结 4 621
一生所求
一生所求 2021-01-23 04:24

I have 2 set of 2d array and i want merge into 1 2d array. but the number of element in each array its not same and for the first 2 element is same and i don\'t want to duplicat

4条回答
  •  星月不相逢
    2021-01-23 04:51

    use array_merge_recursive example

    $array = array_merge_recursive($array1, $array2);
     var_dump($array);
    

提交回复
热议问题