您好,欢迎访问一九零五行业门户网

关于php读取数组的简单问题

array
(
    [state] => 1
    [data] => array
        (
            [0] => array
                (
                    [catid] => 105
                    [name] => 通知
                    [url] => http://www.xingan111.cn/jzxa/tongzhi/
                    [haschildren] => 1
                )
[1] => array
                (
                    [catid] => 106
                    [name] => 新闻
                    [url] => http://www.xingan111.cn/jzxa/jzxanews/
                    [haschildren] => 1
                )
[2] => array
                (
                    [catid] => 114
                    [name] => 社区
                    [url] => http://www.xingan111.cn/jzxa/jzxashequ/
                    [haschildren] => 1
                )
[3] => array
                (
                    [catid] => 115
                    [name] => 公益
                    [url] => http://www.xingan111.cn/jzxa/jzxagongyi/
                    [haschildren] => 1
                )
[4] => array
                (
                    [catid] => 116
                    [name] => 执法
                    [url] => http://www.xingan111.cn/jzxa/jzxazhifa/
                    [haschildren] => 1
                )
[5] => array
                (
                    [catid] => 117
                    [name] => 政法
                    [url] => http://www.xingan111.cn/jzxa/jzxazhengfa/
                    [haschildren] => 1
                )
[6] => array
                (
                    [catid] => 118
                    [name] => 便民
                    [url] =>http://www.xingan111.cn/jzxa/jzxabianmin/
                    [haschildren] => 1
                )
[7] => array
                (
                    [catid] => 119
                    [name] => 美图
                    [url] => http://www.xingan111.cn/jzxa/jzxameitu/
                    [haschildren] => 1
                )
)
)
如上面的数组,我想将[catid] [name] [url] [haschildren]对应的值都读出来(php方式),怎么做?
回复讨论(解决方案) 读到哪里?
既然您认为是 简单问题,那为何不自己解决呢?
我才开始学,但是这个问题应该用两个foreach就能遍历了吧
读到字符串里,我以前搞delphi,刚接触php。
编程不是凑代码!
你先要知道你想要什么样的结果,然后抱你的想法用计算机语言写出来
其它类似信息

推荐信息