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