RE: [PHP] stripping code from another file

From: Date: Thu, 27 Jul 2000 17:02:24 +0000
Subject: RE: [PHP] stripping code from another file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8589@lists.php.net to get a copy of this message
This might not relate exactly to your question but I though I might post this code anyway. I've written a little function that will take an included HTML document and return only the HTML portion contained within the body tags. It's great for including pages within pages. I've attached the code if anyone's interested. Jason > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#8589) next »