1
我有一个数组,它返回各种字符串,我试图html解码。但我似乎无法找到适用于所有字符串的函数。例如,我的一个字符串看起来是这样的:PHP的html解码字符串
"a detail of The School of Athens<!-- this should link to an article about the famous artwork -->, a fresco by Raphael"
而其他看起来像这样:
""Aristotle" by Francesco Hayez (1791–1882)"
我既可以使用html_entity_decode
摆脱第一个字符串中的注释(<!--/-->
)的,或htmlentities
在第二个将–
更改为-
,但我找不到任何将所有我的字符串更改为常规文本。有没有可以做到这一点的功能?
TIA!