方法一:
使用php自带的一个函数:html_entity_decode();
具体使用举例:
html页面的代码:
$str='<strong style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align:baseline;font-weight: 700; background: transparent;">{$res}</strong>';
php端的代码:
$str = 'Epoxy Technology, Inc.';
$res = html_entity_decode($str);
以上代码html浏览器打开如下:Epoxy Technology, Inc.
方法二:
讲带标签的数据assign到html页面,在读取该数据的时候在后面加上 |html_entity_decode=###
举例:
{$districtlist.catedetail|html_entity_decode=###}