{"id":562,"date":"2024-04-15T08:41:53","date_gmt":"2024-04-14T23:41:53","guid":{"rendered":"http:\/\/inwelly.com\/?p=562"},"modified":"2024-04-23T05:28:16","modified_gmt":"2024-04-22T20:28:16","slug":"php-%eb%82%b4%ec%9a%a9%ec%9d%98-br-%ed%85%8c%ea%b7%b8-%ec%a0%9c%ea%b1%b0-%eb%b0%8f-%ed%96%89%ea%b0%84-%ec%a4%84-%eb%b0%94%ea%bf%88-%ec%8b%a4%ed%96%89","status":"publish","type":"post","link":"https:\/\/inwelly.com\/?p=562","title":{"rendered":"PHP \ub0b4\uc6a9\uc758 BR \ud14c\uadf8 \uc81c\uac70 \ubc0f \ud589\uac04 \uc904 \ubc14\uafc8 \uc2e4\ud589"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>## BR \uc81c\uac70 1\nfunction clear_br($text)\n{\n$pattern = \"&lt;(\/&#91;Tt]|&#91;Tt])(TABLE|table|R|r|D|d)(&#91;&#91;:graph:] ]*)(>|>&#91;&#91;:space:]]*)\";\nReturn eregi_replace($pattern,\"&lt;\\\\1\\\\2\\\\>\",$text);\n}\n\n## BR \uc81c\uac70 2\n$content1 = preg_replace('\/&lt;(table|\\\/?tr|\\\/?td)(.*)>\\s*\/i', '&lt;$1$2>', $content1);\n\n\n#########################################################\n### \uc0ac\uc6a9\ubc29\ubc95 \uc608 ############################################\n#########################################################\n\n\ub0b4\uc6a9 = \"&lt;font size=100>test&lt;\/font>\n\uae00\uc744 \uc785\ub825 \ud574\ubd05\ub2c8\ub2e4.\n&lt;b>TEST&lt;\/b>\n\";\n\n$content1   = \"\ub0b4\uc6a9\" ;\n$content1   = htmlspecialchars($content1);\n$content1   = preg_replace(\"\/&amp;lt;&#91;&#91;:space:]]*a&#91;&#91;:space:]]+href=&amp;quot;(.*?)&amp;quot;&#91;&#91;:space:]]*&amp;gt;(.*?)&amp;lt;\\\/&#91;&#91;:space:]]*a&#91;&#91;:space:]]*&amp;gt;\/\", \"&lt;a href=\\\\\\\"$1\\\\\\\">$2&lt;\/a>\",$content1);\n$content1   = nl2br($content1);\n$content1   = clear_br($content1);  \/\/ BR \uc81c\uac70 1 \ud568\uc218 \uc0ac\uc6a9\n\n\/\/ result  ------------------------\n\n&lt;font size=100>test&lt;\/font>\n\uae00\uc744 \uc785\ub825 \ud574\ubd05\ub2c8\ub2e4.\n&lt;b>TEST&lt;\/b><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1251,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-562","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=562"}],"version-history":[{"count":1,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/562\/revisions"}],"predecessor-version":[{"id":563,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/posts\/562\/revisions\/563"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=\/wp\/v2\/media\/1251"}],"wp:attachment":[{"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inwelly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}