Jump to content

Selecting html


newbtophp

Recommended Posts

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?  :-\

Link to comment
https://forums.phpfreaks.com/topic/195948-selecting-html/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.