{"id":574,"date":"2020-05-22T16:06:05","date_gmt":"2020-05-22T13:06:05","guid":{"rendered":"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/?p=574"},"modified":"2020-05-22T16:43:39","modified_gmt":"2020-05-22T13:43:39","slug":"peretvorennia-riadkiv-v-masyvy-i-navpaky-v-php","status":"publish","type":"post","link":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/peretvorennia-riadkiv-v-masyvy-i-navpaky-v-php\/","title":{"rendered":"\u041f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0440\u044f\u0434\u043a\u0456\u0432 \u0432 \u043c\u0430\u0441\u0438\u0432\u0438 \u0456 \u043d\u0430\u0432\u043f\u0430\u043a\u0438"},"content":{"rendered":"<p>PHP \u0432\u043c\u0456\u0454 \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0437 \u0440\u044f\u0434\u043a\u0430 \u0432 \u043c\u0430\u0441\u0438\u0432 \u0456 \u043d\u0430\u0432\u043f\u0430\u043a\u0438, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0432 PHP \u0454 \u0444\u0443\u043d\u043a\u0446\u0456\u044f <code>implode<\/code> \u0456 <code>explode<\/code>.<\/p>\n<p><code>implode<\/code> &#8211; \u0444\u043e\u0440\u043c\u0443\u0454 \u0440\u044f\u0434\u043e\u043a \u0437 \u043c\u0430\u0441\u0438\u0432\u0443.<\/p>\n<p><code>explode<\/code> &#8211; \u0444\u043e\u0440\u043c\u0443\u0454 \u043c\u0430\u0441\u0438\u0432 \u0437 \u0440\u044f\u0434\u043a\u0430.<\/p>\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u0457 <code>implode<\/code>:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$arr[0] = \"PHP\"; \r\n$arr[1] = \"HTML\"; \r\n$arr[2] = \"CSS\";\r\n\r\n$string = implode(\", \", $arr);\r\necho $string; \r\n?&gt;<\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456:<\/p>\n<pre class=\"result\">PHP, HTML, CSS<\/pre>\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u0457 <code>explode<\/code>:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$string = \"PHP, HTML, CSS\";\r\n$arr = explode(\", \", $string);\r\nprint_r($arr); \r\n?&gt;<\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456:<\/p>\n<pre class=\"result\">Array ( [0] =&gt; PHP [1] =&gt; HTML [2] =&gt; CSS )<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u0432\u043c\u0456\u0454 \u043f\u0435\u0440\u0435\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0437 \u0440\u044f\u0434\u043a\u0430 \u0432 \u043c\u0430\u0441\u0438\u0432 \u0456 \u043d\u0430\u0432\u043f\u0430\u043a\u0438, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0432 PHP \u0454 \u0444\u0443\u043d\u043a\u0446\u0456\u044f implode \u0456 explode. implode &#8211; \u0444\u043e\u0440\u043c\u0443\u0454 \u0440\u044f\u0434\u043e\u043a \u0437 \u043c\u0430\u0441\u0438\u0432\u0443. explode &#8211; \u0444\u043e\u0440\u043c\u0443\u0454 \u043c\u0430\u0441\u0438\u0432 \u0437 \u0440\u044f\u0434\u043a\u0430. \u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u0457 implode: &lt;?php $arr[0] = &#8220;PHP&#8221;; $arr[1] = &#8220;HTML&#8221;; $arr[2] = &#8220;CSS&#8221;; $string = implode(&#8220;, &#8220;, $arr); echo $string; ?&gt; \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-574","post","type-post","status-publish","format-standard","hentry","category-massyvy"],"_links":{"self":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/comments?post=574"}],"version-history":[{"count":2,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":586,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/574\/revisions\/586"}],"wp:attachment":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}