A simple question about php reading arrays

Source: Internet
Author: User
A simple question about php reading arrays Array
(
[State] => 1
[Data] => Array
(
[0] => Array
(
[Catid] = & gt; 105
[Name] => Notification
[Url] => http://www.xingan111.cn/jzxa/tongzhi/
[HasChildren] => 1
)

[1] => Array
(
[Catid] = & gt; 106
[Name] => News
[Url] => http://www.xingan111.cn/jzxa/jzxanews/
[HasChildren] => 1
)

[2] => Array
(
[Catid] = & gt; 114
[Name] => Community
[Url] => http://www.xingan111.cn/jzxa/jzxashequ/
[HasChildren] => 1
)

[3] => Array
(
[Catid] = & gt; 115
[Name] => Public Welfare
[Url] => http://www.xingan111.cn/jzxa/jzxagongyi/
[HasChildren] => 1
)

[4] => Array
(
[Catid] = & gt; 116
[Name] => law enforcement
[Url] => http://www.xingan111.cn/jzxa/jzxazhifa/
[HasChildren] => 1
)

[5] => Array
(
[Catid] = & gt; 117
[Name] => Politics and Law
[Url] => http://www.xingan111.cn/jzxa/jzxazhengfa/
[HasChildren] => 1
)

[6] => Array
(
[Catid] = & gt; 118
[Name] => Convenience
[Url] => http://www.xingan111.cn/jzxa/jzxabianmin/
[HasChildren] => 1
)

[7] => Array
(
[Catid] = & gt; 119
[Name] => Meitu
[Url] => http://www.xingan111.cn/jzxa/jzxameitu/
[HasChildren] => 1
)

)

)


In the preceding array, I want to read the values of [catid] [name] [url] [hasChildren] (in php mode). how can I do this?


Reply to discussion (solution)

Where to read?
In your opinionSimple questionWhy not solve it by yourself?

I started learning, but I should use two foreach to traverse this problem.

Reading the string, I used to work on delphi and just got in touch with php.

Programming is not code collection!
First you need to know what kind of results you want, and then write your ideas in computer language.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.