重新格式化数组以制作一维数组

时间:2019-01-18 16:03:03

标签: arrays phpspreadsheet

Array
(
    [0] => Array
        (
            [0] => 1
            [1] => Lucknow
            [2] => Array
                (
                    [0] => 5
                    [1] =>  10
                    [2] =>  4
                    [3] =>  3
                    [4] =>  2
                )

        )

    [1] => Array
        (
            [0] => Region Name:-20
        )

)

以下是我现在得到的输出,我想为array [0]中的array重新索引,我想包含array [2],即:-

Array
(
    [0] => Array
        (
            [0] => 1
            [1] => Lucknow
            [2] => 5
            [3] =>  10
            [4] =>  4
            [5] =>  3
            [6] =>  2
        )
    [1] => Array
        (
            [0] => Region Name:-20
        )
)

请建议我对代码进行哪些更改。

0 个答案:

没有答案