How to remove only html tags in a string?

后端 未结 5 2213
庸人自扰
庸人自扰 2021-01-04 17:49

I have written code for removing HTML tags, but it is also removing a type of strings. I want it to not to remove strings like 2<3 or

5条回答
  •  庸人自扰
    2021-01-04 18:19

    Use strip_tags

    //If you want to allow some tags
    $term = strip_tags($term,"");
    

提交回复
热议问题