newbtophp Posted March 20, 2010 Share Posted March 20, 2010 How would i add a comment to where the html chunk starts and ends? <script language = "javascript" type = "text/javascript"> //js </script> <center>hey</center> hellos Would become: <!--START--> <script language = "javascript" type = "text/javascript"> //js </script> <center>hey</center> <!--END--> hellos I've tried. $str = str_replace(strip_tags($file), "<!--START-->", $str); Perhaps using strip_tags() with file() or regex? :-\ Quote Link to comment https://forums.phpfreaks.com/topic/195948-selecting-html/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.