Re: stripping code from another file

From: Date: Thu, 27 Jul 2000 16:49:37 +0000
Subject: Re: stripping code from another file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8587@lists.php.net to get a copy of this message
At 08:21 27.07.00 -0400, you wrote: >I'm at a certain page and I'd like to include a *section* of HTML from >another page. I could do a fgets() and test for the start and end strings >for a match and echo everything inbetween or do a file() which throughs >everything into an array, then do the same test. > >Is someone seeing how I could do this easier? I may have to resort to >modifing the include() function into accepting a start and stop parameter. mmm what if you have the html part made as an include to both sides? example ---------------------------- page1.php .. include "myhtmlstuff"; ... ----------------------------- page2.php .. include "myhtmlstuff"; ... ----------------------------- myhtmlstuff ?> <tag> <blah> <tag> <? ------------------------------ do you thougth about this? g´s oliver

« previous php.general (#8587) next »