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