字符串转义 保存到mysql

$str="what's this";
$en_str=htmlentities($str,ENT_QUOTES);
echo $en_str."
";

echo html_entity_decode($en_str,ENT_QUOTES);

what&#039;s  this<br/>
what's  this

posted @ 2020-11-12 14:04  Bashuslovakia  阅读(283)  评论(0编辑  收藏  举报