PHP removing html tags from string

后端 未结 6 1840
小鲜肉
小鲜肉 2020-12-02 02:06

I have string:

Vers­lo cent­rai Lie­tu­vos ne­kil­no­ja­mo­jo turto plėt­ros aso­cia­ci­jos kon­kur­se ...

6条回答
  •  感动是毒
    2020-12-02 02:16

    This will remove every thing - tags, ascii, line breaks but pure text:

    strip_tags(preg_replace('/<[^>]*>/','',str_replace(array(" ","\n","\r"),"",html_entity_decode($YOUR_STRING,ENT_QUOTES,'UTF-8'))));
    

提交回复
热议问题