1
PHP - 닫히지 않은 HTML 태그를 끝내시겠습니까?
<strong>bunch <em>of</em> <span>random text
코드가이 문자열을 가져 와서 다음과 같이 바꿀 수있게하고 싶습니다.
<strong>bunch <em>of</em> <span>random text</span></strong>
PHP - 닫히지 않은 HTML 태그를 끝내시겠습니까?
<strong>bunch <em>of</em> <span>random text
코드가이 문자열을 가져 와서 다음과 같이 바꿀 수있게하고 싶습니다.
<strong>bunch <em>of</em> <span>random text</span></strong>
보는 1 위를 인 Tidy extension
$html = "<strong>bunch <em>of</em> <span>random text";
$tidy = tidy_parse_string($html, array('clean' => true, 'show-body-only' => true));
$tidy->cleanRepair();
echo $tidy;
Tidy : http://php.net/tidy – erisco