How to extract only text from HTML string with PHP?

后端 未结 3 1563
野的像风
野的像风 2020-12-09 19:52

I want to extract only text from a php string.

This php string contains html code like tags or etc.

So I only need a simple text from this string.

<
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 20:46

    Adding another option for someone else who may need this, the Stringizer library might be an option, see Strip Tags.

    Full disclosure I'm the owner of the project.

提交回复
热议问题