<?php
$test = "<!--my comment goes here--> Hello World ";
echo preg_replace('/\<.*?\>/','',$test);
?>
the code above echos hello world i want it to echo my comment goes here
<?php
$test = "<!--my comment goes here--> Hello World ";
echo preg_replace('/\<.*?\>/','',$test);
?>
the code above echos hello world i want it to echo my comment goes here