{"id":3149,"date":"2012-05-07T04:42:10","date_gmt":"2012-05-07T04:42:10","guid":{"rendered":"http:\/\/phpcodez.com\/?p=3149"},"modified":"2012-05-07T04:42:10","modified_gmt":"2012-05-07T04:42:10","slug":"array_merge_recursive","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/array_merge_recursive\/","title":{"rendered":"array_merge_recursive"},"content":{"rendered":"<div>It merges two or more arrays recursively<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;?php<br \/>\necho &#8220;&lt;pre&gt;&#8221;;<br \/>\n$array1 = array(&#8220;PHP&#8221; =&gt; array(&#8220;WEB&#8221; =&gt; &#8220;1&#8221;), 7);<br \/>\n$array2 = array(17, &#8220;ASP&#8221; =&gt; array(&#8220;FAV&#8221; =&gt; &#8220;34&#8221;, &#8220;84&#8221;));<br \/>\n$array3 =($array1, $array2);<br \/>\nprint_r($array3);<br \/>\n?&gt;<\/p>\n<p><strong>Output<\/strong><\/p>\n<p>Array<br \/>\n(<br \/>\n[PHP] =&gt; Array<br \/>\n(<br \/>\n[WEB] =&gt; 1<br \/>\n)<\/p>\n<p>[0] =&gt; 7<br \/>\n[1] =&gt; 17<br \/>\n[ASP] =&gt; Array<br \/>\n(<br \/>\n[FAV] =&gt; 34<br \/>\n[0] =&gt; 84<br \/>\n)<\/p>\n<p><strong id=\"internal-source-marker_0.013107894221320748\"><br \/>\n<\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It merges two or more arrays recursively Example &lt;?php echo &#8220;&lt;pre&gt;&#8221;; $array1 = array(&#8220;PHP&#8221; =&gt; array(&#8220;WEB&#8221; =&gt; &#8220;1&#8221;), 7); $array2 = array(17, &#8220;ASP&#8221; =&gt; array(&#8220;FAV&#8221; =&gt; &#8220;34&#8221;, &#8220;84&#8221;)); $array3 =($array1, $array2); print_r($array3); ?&gt; Output Array ( [PHP] =&gt; Array ( [WEB] =&gt; 1 ) [0] =&gt; 7 [1] =&gt; 17 [ASP] =&gt; Array ( [FAV] &hellip; <a href=\"http:\/\/phpcodez.com\/array_merge_recursive\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">array_merge_recursive<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[54,213,370],"class_list":["post-3149","post","type-post","status-publish","format-standard","hentry","category-php","tag-array","tag-functions","tag-php"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/3149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=3149"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/3149\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=3149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=3149"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=3149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}