how to hide html tags without remove it in php form
im getting stuck when i save string with paragraph, and the html tags <p></p>
and <br></br>
is come to开发者_Go百科 save into database, if i use strip_tags()
the string is being RAW..
anyone can help me pleasee..
sorry for my poor english
if you need to have exceptions for your tags you can do
strip_tags($string,"<p><br>");
this will remove all tags except p and br.
to escape a string you can use
mysql_real_escape_string($str);
or just
addslashes($str);
The strip_tags()
function takes a second argument:
string strip_tags ( string $str [, string $allowable_tags ] )
If you specify which tags you want saved (e.g., strip_tags($text, '<p><br>');
), it will not remove those tags.
u can use strip_tags();
and also possible to use jq; its very easy and efective,, u can use
$('<p>').attr('disabled',"disabled"");
if u any help comment my link i ll tell u
精彩评论