PHP preg_replace html comments with empty space
- by phpmatt
Hi Guys,
I have a bit of php code like this:
$test = "<!--my comment goes here--> Hello World";
Now i want to strip the whole html comment from the string, i know i need to use preg_replace, but now sure on the regex to go in there.
Can anybody help?
Thanks