{"id":3256,"date":"2020-09-11T13:51:49","date_gmt":"2020-09-11T12:51:49","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=3256"},"modified":"2025-04-10T10:29:33","modified_gmt":"2025-04-10T09:29:33","slug":"debugging-array","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/debugging\/debugging-array","title":{"rendered":"Debugging Arrays"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Echo the contents of an array<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  print_r($my_array);\n  \/\/or\n  print_r($my_array&#91;0]);\n  \/\/or\n  echo json_encode($my_array);<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">If you want to return it, not echo it<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>\tprint_r($my_array, true);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Echo the contents of an array If you want to return it, not echo it<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,31],"tags":[],"class_list":["post-3256","post","type-post","status-publish","format-standard","hentry","category-debugging","category-arrays"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3256","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=3256"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3256\/revisions"}],"predecessor-version":[{"id":3900,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3256\/revisions\/3900"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=3256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=3256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=3256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}