{"id":187,"date":"2007-12-17T15:39:27","date_gmt":"2007-12-17T06:39:27","guid":{"rendered":"https:\/\/deskplate.net\/blog\/2007\/12\/17\/dmm%e3%81%ae%e3%82%a2%e3%83%95%e3%82%a3%e3%83%aa%e3%82%a8%e3%82%a4%e3%83%88id%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88\/"},"modified":"2007-12-17T15:39:27","modified_gmt":"2007-12-17T06:39:27","slug":"dmm%e3%81%ae%e3%82%a2%e3%83%95%e3%82%a3%e3%83%aa%e3%82%a8%e3%82%a4%e3%83%88id%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88","status":"publish","type":"post","link":"https:\/\/deskplate.net\/blog\/archives\/187","title":{"rendered":"DMM\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8ID\u66f8\u304d\u63db\u3048"},"content":{"rendered":"<p>PHP\u306e\u6b63\u898f\u8868\u73fe\u3068\u30ea\u30d7\u30ec\u30a4\u30b9\u3067\u3084\u308c\u3070\u3053\u3093\u306a\u611f\u3058\u304b\u306a\uff1f<br \/>\nfunction replace_link($str) {<br \/>\n\u3000$pattern = &#8216;\/(&lt;a href=&#8221;)[^>]+(>[^&lt;]+&lt;\\\/a>)\/&#8217;;<br \/>\n\u3000preg_match_all($pattern,$str,$matches) ;<br \/>\n\u3000for($i = 0 ;$i &lt; count($matches[0]) ;$i++ ) {<br \/>\n\u3000\u3000preg_match_all($pattern,$matches[0][$i],$matches_link) ;<br \/>\n\u3000\u3000$link = str_replace($matches_link[1][0],&#8221;&#8221;,$matches[0][$i]);<br \/>\n\u3000\u3000$link = str_replace($matches_link[2][0],&#8221;&#8221;,$link);<br \/>\n\u3000\u3000$link_array = explode(&#8216;\/&#8217;,$link);<br \/>\n\u3000\u3000$new_link = &#8220;&#8221;;<br \/>\n\u3000\u3000for($h=0;$h<count($link_array)-1;$h++){\n\u3000\u3000\u3000 $new_link .= $link_array[$h].'\/';\n\u3000\u3000}\n\u3000\u3000$new_link .= '\u81ea\u5206\u306e\u30a2\u30d5\u30a3\u30ea\u30a8\u30a4\u30c8ID\" target=\"_blank\"';\n\u3000\u3000$replace_link = \"$1$new_link$2\";\n\u3000\u3000$matches_r[] = preg_replace($pattern,$replace_link,$matches[0][$i]) ;\n\u3000}\n\u3000return str_replace($matches[0],$matches_r,$str) ;\n}\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u306e\u6b63\u898f\u8868\u73fe\u3068\u30ea\u30d7\u30ec\u30a4\u30b9\u3067\u3084\u308c\u3070\u3053\u3093<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:attachment":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}