{"id":49779,"date":"2018-09-19T20:57:36","date_gmt":"2018-09-19T14:57:36","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=49779"},"modified":"2018-09-19T20:57:36","modified_gmt":"2018-09-19T14:57:36","slug":"array_key_exists-%d0%bf%d1%80%d0%be%d0%b2%d0%b5%d1%80%d0%ba%d0%b0-%d0%bd%d0%b0%d0%bb%d0%b8%d1%87%d0%b8%d1%8f-%d0%ba%d0%bb%d1%8e%d1%87%d0%b0-%d0%b2-%d0%bc%d0%b0%d1%81%d1%81%d0%b8%d0%b2%d0%b5","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=49779","title":{"rendered":"array_key_exists &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435"},"content":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<strong>array_key_exists()<\/strong>\u00a0\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u00a0<strong>TRUE<\/strong>, \u0435\u0441\u043b\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u044e\u0447.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440 1<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$a<\/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;\">'dd1'<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043a\u043e\u0448\u043a\u0430'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">'dd2'<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043c\u044b\u0448\u043a\u0430'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u0441\u0430\u043f\u043e\u0433'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">6<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043f\u0440\u044f\u043d\u0438\u043a'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <a href=\"http:\/\/www.php.net\/array_key_exists\"><span style=\"color: #990000;\">array_key_exists<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'dd1'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span> <span style=\"color: #666666; font-style: italic;\">\/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 1<\/span><\/pre>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440 2<\/p>\n<pre class=\"php\" style=\"font-family: monospace; font-size: 12px;\"><span style=\"color: #000088;\">$a<\/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;\">'dd1'<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043a\u043e\u0448\u043a\u0430'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000ff;\">'dd2'<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043c\u044b\u0448\u043a\u0430'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u0441\u0430\u043f\u043e\u0433'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #cc66cc;\">6<\/span><span style=\"color: #339933;\">=&gt;<\/span><span style=\"color: #0000ff;\">'\u043f\u0440\u044f\u043d\u0438\u043a'<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #009900;\">(<\/span><a href=\"http:\/\/www.php.net\/array_key_exists\"><span style=\"color: #990000;\">array_key_exists<\/span><\/a><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">'dd1'<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #009900;\">{<\/span>\r\n<span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"dd1 = \"<\/span><span style=\"color: #339933;\">.<\/span><span style=\"color: #000088;\">$a<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #0000ff;\">'dd1'<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #339933;\">;<\/span>\r\n<span style=\"color: #009900;\">}<\/span>\r\n<span style=\"color: #b1b100;\">else<\/span> <span style=\"color: #009900;\">{<\/span><span style=\"color: #b1b100;\">echo<\/span> <span style=\"color: #0000ff;\">\"dd1 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0435\u0442\"<\/span><span style=\"color: #339933;\">;<\/span><span style=\"color: #009900;\">}<\/span><\/pre>\n<pre>dd1 = \u043a\u043e\u0448\u043a\u0430<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f\u00a0array_key_exists()\u00a0\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u00a0TRUE, \u0435\u0441\u043b\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u044e\u0447. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: \u043f\u0440\u0438\u043c\u0435\u0440 1 $a = array (&#8216;dd1&#8217;=&gt;&#8217;\u043a\u043e\u0448\u043a\u0430&#8217;,&#8217;dd2&#8217;=&gt;&#8217;\u043c\u044b\u0448\u043a\u0430&#8217;,4=&gt;&#8217;\u0441\u0430\u043f\u043e\u0433&#8217;,6=&gt;&#8217;\u043f\u0440\u044f\u043d\u0438\u043a&#8217;); echo array_key_exists(&#8216;dd1&#8217;,$a); \/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 1 \u043f\u0440\u0438\u043c\u0435\u0440 2 $a = array (&#8216;dd1&#8217;=&gt;&#8217;\u043a\u043e\u0448\u043a\u0430&#8217;,&#8217;dd2&#8217;=&gt;&#8217;\u043c\u044b\u0448\u043a\u0430&#8217;,4=&gt;&#8217;\u0441\u0430\u043f\u043e\u0433&#8217;,6=&gt;&#8217;\u043f\u0440\u044f\u043d\u0438\u043a&#8217;); if (array_key_exists(&#8216;dd1&#8217;,$a)) { echo &#171;dd1 = &#171;.$a[&#8216;dd1&#8217;]; } else {echo &#171;dd1 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0435\u0442&#187;;} dd1 = \u043a\u043e\u0448\u043a\u0430<\/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-49779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":1507,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49779","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=49779"}],"version-history":[{"count":1,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49779\/revisions"}],"predecessor-version":[{"id":49780,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49779\/revisions\/49780"}],"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=49779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49779"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}