Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Parse out body content from html file in PHP (See related posts)

Parse out the body content of an html file. If no tags found, assume whole file is the content to be used.

        $body_content = join( "", file( $file_to_be_read ) );
        if (eregi( "(.*)", $t, $regs ) ) {
                $body_content = $regs[0];
        }

You need to create an account or log in to post comments to this site.


Related Posts