Search code examples
phpdouble-quotes

How to delete from string particular word containing double quotes ''"?


I want to delete <?xml version="1.0" encoding="utf-8"?> from my string containg this and after that lots of other things. How to delete it because of several double quotes I am having problem to define str_replace function.


Solution

  • You could consider using single quotes:

    str_replace('<?xml version="1.0" encoding="utf-8"?>', '', $myString);