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!