我有和这样的html字符串:
<div class="short-description"> <h2></h2> <div class="std"><p>This <strong>1-1/2 in by 25 ft. Deluxe In-Ground Pool Vacuum Hose</strong> fits most in-ground residential and commercial pool cleaning applications. The continuous spiral wound construction of the vacuum hose provides excellent flexibility and strength. The smooth spiral design inner wall also allows for maximum efficiency of water flow.</p><br /><p><em>**Color may be blue or grey**</em></p></div> </div>
我使用htmlentities
对其进行编码并再次使用html_entity_decode
对其进行解码,然后成功解码,但是当在网络浏览器上时,它会像:
"<div></div>"
html将打印在页面上。
我知道这与编码无关,html是保存在db表中的任何想法。
由于
答案 0 :(得分:3)
您似乎对您的实体进行了双重编码。如果您无法解决问题,请发布PHP代码,但看起来您正在编码已经由html实体编码的字符串。