{"id":50058,"date":"2018-09-28T11:13:47","date_gmt":"2018-09-28T05:13:47","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=50058"},"modified":"2018-09-28T11:14:48","modified_gmt":"2018-09-28T05:14:48","slug":"compact-%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d0%bc%d0%b0%d1%81%d1%81%d0%b8%d0%b2%d0%b0-%d1%81%d0%be%d0%b4%d0%b5%d1%80%d0%b6%d0%b0%d1%89%d0%b8%d0%b9-%d0%bd%d0%b0%d0%b7%d0%b2%d0%b0%d0%bd","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=50058","title":{"rendered":"compact &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f"},"content":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f compact() \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0442\u0435\u043f\u043b\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$b<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0445\u043e\u043b\u043e\u0434\u043d\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$c<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0436\u0430\u0440\u043a\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$arr<\/span> <span style=\"color: #339933;\">=<\/span> <a href=\"http:\/\/www.php.net\/array\"><span style=\"color: #990000;\">array<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"a\"<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">\"b\"<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">\"c\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<a href=\"http:\/\/www.php.net\/print_r\"><span style=\"color: #990000;\">print_r<\/span><\/a> <span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$result<\/span> <span style=\"color: #339933;\">=<\/span> <a href=\"http:\/\/www.php.net\/compact\"><span style=\"color: #990000;\">compact<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$arr<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<pre>Array\r\n(\r\n    [a] =&gt; \u0442\u0435\u043f\u043b\u043e\r\n    [b] =&gt; \u0445\u043e\u043b\u043e\u0434\u043d\u043e\r\n    [c] =&gt; \u0436\u0430\u0440\u043a\u043e\r\n)<\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 array(), \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0432 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0compact():<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$a<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0442\u0435\u043f\u043b\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$b<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0445\u043e\u043b\u043e\u0434\u043d\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #000088;\">$c<\/span> <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"\u0436\u0430\u0440\u043a\u043e\"<\/span><span style=\"color: #339933;\">;<\/span>\r\n<a href=\"http:\/\/www.php.net\/print_r\"><span style=\"color: #990000;\">print_r<\/span><\/a> <span style=\"color: #009900;\">(<\/span><span style=\"color: #000088;\">$result<\/span> <span style=\"color: #339933;\">=<\/span> <a href=\"http:\/\/www.php.net\/compact\"><span style=\"color: #990000;\">compact<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"c\"<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">\"b\"<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">\"a\"<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000088;\">$arr<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<pre>Array\r\n(\r\n    [c] =&gt; \u0436\u0430\u0440\u043a\u043e\r\n    [b] =&gt; \u0445\u043e\u043b\u043e\u0434\u043d\u043e\r\n    [a] =&gt; \u0442\u0435\u043f\u043b\u043e\r\n)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f compact() \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: $a = &#171;\u0442\u0435\u043f\u043b\u043e&#187;; $b = &#171;\u0445\u043e\u043b\u043e\u0434\u043d\u043e&#187;; $c = &#171;\u0436\u0430\u0440\u043a\u043e&#187;; $arr = array(&#171;a&#187;,&#187;b&#187;,&#187;c&#187;); print_r ($result = compact($arr)); Array ( [a] =&gt; \u0442\u0435\u043f\u043b\u043e [b] =&gt; \u0445\u043e\u043b\u043e\u0434\u043d\u043e [c] =&gt; \u0436\u0430\u0440\u043a\u043e ) \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 array(), \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0432 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0compact(): $a = &#171;\u0442\u0435\u043f\u043b\u043e&#187;; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":49675,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-50058","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":1710,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/50058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=50058"}],"version-history":[{"count":2,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/50058\/revisions"}],"predecessor-version":[{"id":50060,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/50058\/revisions\/50060"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/49675"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50058"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}