How to strip html tag

To day I’m write php code for get content from ezinearticle.com and post it to my blogger via gmail. after I use file_get_contents I had a html code of content then I must strip html tag out and cut out some body I try to search for google and found at php.net can help me.

<?php
$text
= ‘<p>Test paragraph.</p><!– Comment –> <a href=”#fragment”>Other text</a>’;
echo
strip_tags($text);
echo
“\n”;

// Allow <p> and <a>
echo strip_tags($text, ‘<p><a>’);
?>

In function can strip another <p>, <a>.

Leave a Reply