Forum Moderators: coopster
$reg_exp = array('<(?i)style[\s\S]*?\/style>','<(?i)script[\s\S]*?\/script>','<!--[\s\S]*?-->','@<[\/\!]*?[^<>]*?>@si', '@<[\/\!]*?[^<>]*?@si','@
\/\*[\/\!]*?[^<>]*?\*\/@si','/ /');
$results = preg_replace($reg_exp, array(""), $your_html_goes_here); After what $results should hold 'content only'. I should warn you that this code still has some problems (mostly with javascript detection)