PHP – HTML Remove JavaScript
I am trying to remove JavaScript from the HTML.
In addition use strip_tags in php function
echo strip_tags("Hello <b>world!</b>");
output:
Hello world!
you can use :
echo preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', "", $var);