Jump to content

How do I show a page, but exclude some parts?


OM2

Recommended Posts

I want to show a web page I have, but exclude some parts.

I want to parse this through PHP and output everytning apart from the exluded.

 

Let me show by example what I want.

Let's say i have the following code in my html file:

<html><head><title></title></head>
<body>
    Hello 123
    <!-- DONT SHOW START -->
    Spiderman
    <!-- DONT SHOW END -->
</body>
</html>

 

i want to be able to show this same page except when i don't want to show anything between

<!-- DONT SHOW START -->

and

<!-- DONT SHOW END -->

 

how do i do this?

 

i know i can replace everything in between the markers by doing a preg_replace: but what i'm confused about is how to show th eoutput in a browser?

 

thanks.

 

 

om

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.