PHP Strip All Except Few Tags – String Function

<?
$input = "I <b>love</b> to <a href = \"http://www.w3mentor.com\">w3mentor<a>!";
$strip_input = strip_tags($user_input, "<a>");
print_r($strip_input);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.