Skip to content
Advertisement

PHP Cleaning special characters from string

so I made this scraper and it returns strings from multiple sites. I want to check if the strings match, so I use php to clean the string and check. However, the & and other special characters appear in 2 ways, one as & and the other as &. How do I go about removing each type.

JavaScript

I already have that, but that doesn’t take out the special characters.

Thanks.

Advertisement

Answer

Try this

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement