array_merge掉失空数组,该如何解决

WBOY
Release: 2016-06-13 11:08:28
Original
1836 people have browsed it

array_merge掉失空数组
array_merge掉失空数组

怎么保留全面初始化模板数组的所有数据?

------解决方案--------------------
print_r(array_merge_recursive($a, $b));

Array
(
    [color_and_size] => Array
        (
            [colors] => Array
                (
                    [0] => 2001
                    [1] => 2002
                )

            [sizes] => Array
                (
                )

        )

)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template