- trim: documentation ( source)
- html_entity_decode: documentation ( source)
<?php
function sTAGS($textNt, $prm) {
$text = trim($textNt);
//echo strip_tags($text, $prm);
//echo htmlentities($text);
//echo htmlentities($text, ENT_QUOTES);
echo html_entity_decode($text);
}
$txt = ' <p>Test-Absatz.</p><!-- Kommentar --> <a href="#fragment">Anderer Text</a>';
sTAGS($txt, "<p>");
?>