{"id":665,"date":"2012-12-14T10:12:09","date_gmt":"2012-12-14T10:12:09","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=665"},"modified":"2022-02-17T07:14:03","modified_gmt":"2022-02-17T07:14:03","slug":"merging-arrays","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/memory\/arrays\/merging-arrays","title":{"rendered":"Merging Arrays"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Join Arrays &#8211; Only adding unique indexes \/ keys<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/\/Only unique index positions\/keys from $MyArray2 will be added, if there is an index\/key clash then $MyArray1 value takes precidence\n  $MyArray3 = $MyArray1 + $MyArray2;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Merge Arrays<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $MyArray3&#91;] = @array_merge($MyArray1, $MyArray2);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Join Arrays &#8211; Only adding unique indexes \/ keys Merge Arrays<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-665","post","type-post","status-publish","format-standard","hentry","category-arrays"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=665"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/665\/revisions"}],"predecessor-version":[{"id":3927,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/665\/revisions\/3927"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}