如何将多个数组转换为单个数组这种格式

时间:2018-04-25 15:34:34

标签: php

这是我的数组

Array( 
    [0] => Array ( 
        [0] => 907 
    ) 
    [1] => Array ( 
        [0] => 205 
        [1] => 251 
        [2] => 256 
        [3] => 334 
        [4] => 938 
    ) 
    [2] => Array ( 
        [0] => 209 
        [1] => 213 
        [2] => 310 
        [3] => 323 
        [4] => 408 
        [5] => 415 
        [6] => 424 442 
        [7] => 510 
        [8] => 530 
        [9] => 559 
        [10] => 562 
        [11] => 619 
        [12] => 626 
        [13] => 628 
        [14] => 650 
        [15] => 657 
        [16] => 661 
        [17] => 669 
        [18] => 707 
        [19] => 714 
        [20] => 747 
        [21] => 760 
        [22] => 805 
        [23] => 818 
        [24] => 831 
        [25] => 858 
        [26] => 909 
        [27] => 916 
        [28] => 925 
        [29] => 949 
        [30] => 951 
    ) 
) 

我有

array( 
    [0] => 907 
    [1] => 205 
    [2] => 251 
    [3] => 256 
    [4] => 334 
    [5] => 938 
    [6] => 209.. 
)

单个数组中的所有多个数组如何

1 个答案:

答案 0 :(得分:0)

如果您需要将所有条目都放入单个数组中,那么最简单的解决方案可能是使用嵌套for循环遍历数组