相关疑难解决方法(0)

PHP:合并2个多维数组

我需要将两个多维数组合并在一起以创建一个新数组.
2个数组是从$_POST和创建的$_FILES,我需要它们相互关联.

数组#1

Array 
(
    [0] => Array
        (
            [0] => 123  
            [1] => "Title #1"
            [2] => "Name #1"
        )
    [1] => Array
        (
            [0] => 124  
            [1] => "Title #2"
            [2] => "Name #2"
        )
)
Run Code Online (Sandbox Code Playgroud)

数组#2

Array
(
    [name] => Array
        (
            [0] => Image001.jpg
            [1] => Image002.jpg
        )
)
Run Code Online (Sandbox Code Playgroud)

新数组

Array
(
    [0] => Array
        (
            [0] => 123  
            [1] => "Title #1"
            [2] => "Name #1"
            [3] => "Image001.jpg"
        )
    [1] …
Run Code Online (Sandbox Code Playgroud)

php multidimensional-array

16
推荐指数
2
解决办法
5万
查看次数

标签 统计

multidimensional-array ×1

php ×1