Php remove html only tags -


it's seems quite simple - strip_tags($string);

but repeat - html tags

with use of strip tags example

"this<thisthisthis" >> 

or

$str = "you can write 'more' < sign" >> "you can write 'more' " 

or

strip_tags("you know 5<8"); //cuts '8' 

and dont want it.

i know basicly <everything> can tag in html, want remove default html tags

so why don't use put tags want keep in string , call strip_tags

$keep = '<a><div><span>'; $new_html = strip_tags($html, $keep); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -