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

后端 未结 4 622
一生所求
一生所求 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 05:02

    $out = array();
    for ($i=0; $i

    Output:

    Array
    (
        [0] => Array
            (
                [0] => 25/2/2013
                [1] => 8.45 a.m
                [2] => 9.98
                [3] => 1.23
                [4] => 6.1
            )
    
        [1] => Array
            (
                [0] => 25/2/2013
                [1] => 8.46 a.m
                [2] => 9.02
                [3] => 1.75
            )
    
    )
    

提交回复
热议问题