{"id":1784,"date":"2017-10-21T11:08:02","date_gmt":"2017-10-21T11:08:02","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1784"},"modified":"2022-02-17T07:14:02","modified_gmt":"2022-02-17T07:14:02","slug":"create-array-from","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/memory\/arrays\/create-array-from","title":{"rendered":"Create Array From"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Create An&nbsp;Array From A String With A Delimiter Character<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\t$myString = \"value1,value2,value3\";\n\t$myArray = explode(',', $myString);\n\tprint_r($myArray);\n<\/code><\/pre>\n\n\n\n<p>Create array of individual digits from a number<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    $UserPhoneNumber_Array  = array_map('intval', str_split($UserPhoneNumber));\r\n    if ($UserPhoneNumber_Array&#91;0] == 0)\r\n      DoSomething();\r\n    if ($UserPhoneNumber_Array&#91;3] == 0)\r\n      DoSomething();<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create An&nbsp;Array From A String With A Delimiter Character Create array of individual digits from a number<\/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-1784","post","type-post","status-publish","format-standard","hentry","category-arrays"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1784","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=1784"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1784\/revisions"}],"predecessor-version":[{"id":3260,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1784\/revisions\/3260"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}