0
I need to remove all tags along with the content and closing of the tag, when it’s script by tag. Example $variable="Something";
I want to remove all this from html
<script>alguma funcao javascript</script>
The idea is like this
$variavel = preg_replace('<script*>*</script>', '', $variavel);
But it didn’t work. Explaining the regex how it should look: He’ll give replace when he starts with
Use the strip_tags function.
– rray
strip tags don’t suit me, because I just want to remove the script tags, the other ones don’t, and I don’t want to remove just the tag, in case the script wants to remove it’s all tag, content all together
– Mega Anim