Or...

preg_match("/<body>(.*)<\/body>/i",$html_text,$matches);

---John Holmes...

> -----Original Message-----
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] removing html...
> 
> Hi,
> 
> I have search around on google/php.net to try and find a way to remove
> <body>, everything above ,</body> and everything below it in a html
page.
> 
> eg.
> 
> <html>
> <head>
> <title>test</test>
> </head>
> <body>
> Blah Blah Blah<br>
> </body>
> </html>
> 
> would become: Blah Blah Blah<br>
> 
> I know how to use php to convert html to pure text etc but I don't
know
> how
> to remove the unwanted header and footer HTML.
> 
> I am pretty sure that someone must have done it(HTML file uploads for
> sites
> etc).
> 
> Thanks in advance and good night.
> 
> 
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to