Home > Backend Development > PHP Tutorial > 3维数组转成一条一条数据有关问题

3维数组转成一条一条数据有关问题

WBOY
Release: 2016-06-13 13:50:34
Original
722 people have browsed it

求助 3维数组转成一条一条数据问题
二维数组转成一条一条的数据我会。比如像下面的数据,我可以得到这样的数据
类型:贴吧
数据:[百度贴吧] => http://tieba.baidu.com/

比如你这样的

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->Array
(
    [贴吧] => Array
        (
            [百度贴吧] => http://tieba.baidu.com/


        )

    [搜藏] => Array
        (
            [百度搜藏] => http://cang.baidu.com/

        )

)




Copy after login


但是现在有这样的一个数组:
PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->Array
(
    [贴吧] => Array
        (
            [百度贴吧] => http://tieba.baidu.com/


        )

    [所有] => Array
        (
             [重庆]=> Array
             (
                  [百度搜藏] => http://cang.baidu.com/
             )
            

        )

)
Copy after login


我想得这样的数据
类型: 所有$$$重庆
数据:[百度搜藏] => http://cang.baidu.com/


以$$$分开它的上级分类。
我主的问题是知道在处理这一个三维数组的时候,不知道怎样遍历???
如果方便,还请高手指点一下,
怎么把一个二维数据A加到另一二维数组B里的一个键值里,给成三维数组???


------解决方案--------------------
为撒不问了 解决没~
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