I have a block of HTML code on some pages of my site that needs to be stripped before being displayed to certain visitors. The entire page source is stored in a variable and then echoed after it has been completely processed.
The easiest way to do this is to put the code in between div tags and then filter out everything from the start to the finish of this div.
The problem is that there are sometimes divs within this div, so when I look for the ending </div> sometimes the function stops on one of the divs in the code.
I'm wondering if it is acceptable to create a custom closing div tag, like '</div id="endCode">'. I've never heard of this before and I can't find any documentation on doing this.
Thanks for your help.