{"id":12210,"date":"2019-09-25T03:55:13","date_gmt":"2019-09-25T08:55:13","guid":{"rendered":"httpss:\/\/www.powenko.com\/wordpress\/?p=12210"},"modified":"2019-09-25T03:56:20","modified_gmt":"2019-09-25T08:56:20","slug":"03-array-of-array","status":"publish","type":"post","link":"https:\/\/www.powenko.com\/wordpress\/?p=12210","title":{"rendered":"03- array of array"},"content":{"rendered":"<pre><a href=\"httpsss:\/\/rextester.com\/QNYQ53194\">httpsss:\/\/rextester.com\/QNYQ53194<\/a><\/pre>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php \/\/php 7.0.8\r\n\r\n$array0=array();\r\n$array1=array(&quot;Orange&quot; =&gt; 100, &quot;Apple&quot; =&gt; 200, &quot;Banana&quot; =&gt; 300, &quot;Cherry&quot; =&gt; 400);\r\n    print_r($array1&#x5B;&quot;Orange&quot;]);\r\n\r\n$foo = &#x5B;];\r\n    $t1=array(\r\n        'url' =&gt; '',\r\n        'name' =&gt; 'fooValue2'\r\n    );\r\n    array_push($foo,$t1 );\r\n    array_push($foo,$t1 );\r\n$data=array('directories' =&gt; $foo);\r\n    \r\n    print_r($data);\r\n    print_r($data&#x5B;'directories']);\r\n    print_r($data&#x5B;'directories']&#x5B;0]);\r\n    print_r($data&#x5B;'directories']&#x5B;0]&#x5B;'name']);\r\n\r\n?&gt;\r\n\r\n<\/pre>\n<p>]<br \/>\n\u8f38\u51fa\uff1a<\/p>\n<pre id=\"Result\" class=\"resultarea\">100Array\r\n(\r\n    [directories] =&gt; Array\r\n        (\r\n            [0] =&gt; Array\r\n                (\r\n                    [url] =&gt; \r\n                    [name] =&gt; fooValue2\r\n                )\r\n\r\n            [1] =&gt; Array\r\n                (\r\n                    [url] =&gt; \r\n                    [name] =&gt; fooValue2\r\n                )\r\n\r\n        )\r\n\r\n)\r\nArray\r\n(\r\n    [0] =&gt; Array\r\n        (\r\n            [url] =&gt; \r\n            [name] =&gt; fooValue2\r\n        )\r\n\r\n    [1] =&gt; Array\r\n        (\r\n            [url] =&gt; \r\n            [name] =&gt; fooValue2\r\n        )\r\n\r\n)\r\nArray\r\n(\r\n    [url] =&gt; \r\n    [name] =&gt; fooValue2\r\n)\r\nfooValue2\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>httpsss:\/\/rextester.com\/QNYQ53194 &lt;?php \/\/php 7.0.8  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[558],"tags":[],"class_list":["post-12210","post","type-post","status-publish","format-standard","hentry","category-ch02-array"],"_links":{"self":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12210"}],"collection":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12210"}],"version-history":[{"count":3,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12210\/revisions"}],"predecessor-version":[{"id":12216,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12210\/revisions\/12216"}],"wp:attachment":[{"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.powenko.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}