PHP 将从数据库中读出的带有html标签的字符串,让标签起效,显示在前台页面

 

PHP htmlspecialchars_decode() 函数

把预定义的 HTML 实体 "<"(小于)和 ">"(大于)转换为字符:

PHP 将从数据库中读出的带有html标签的字符串,让标签起效,显示在前台页面

 

   stripslashes()

 PHP 将从数据库中读出的带有html标签的字符串,让标签起效,显示在前台页面

 

PHP 将从数据库中读出的带有html标签的字符串,让标签起效,显示在前台页面

 

html_entity_decode() 函数把 HTML 实体转换为字符。

$v['text'] = strip_tags(str_replace(" ","",htmlspecialchars_decode($v['text'])));

 

 

 转自https://bbs.csdn.net/topics/392571467   作者:debby004

相关文章:

  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案