How to remove
tags and more from a string?

前端 未结 7 1687
一生所求
一生所求 2020-12-04 00:08

I need to strip all
and all \'quotes\' (\") and all \'ands\' (&) and replace them with a space only ...

How c

7条回答
  •  天命终不由人
    2020-12-04 00:58

    If str_replace() isnt working for you, then something else must be wrong, because

    $string = 'A string with 
    & "double quotes".'; $string = str_replace(array('
    ', '&', '"'), ' ', $string); echo $string;

    outputs

    A string with      double quotes .
    

    Please provide an example of your input string and what you expect it to look like after filtering.

提交回复
热议问题