How to strip HTML tags, scripts, and styles from a web page using PHP
The HTML tags on a web page must be stripped away to get clean text for a PHP search engine, keyword extractor, or some other page analysis tool. PHP’s standard strip_tags( ) function will do part of the job, but you need to strip out styles, scripts, embedded objects, and other unwanted page code first.
-
How to strip HTML tags, scripts, and styles from a web page using PHP
smallwei

smallwei 5:01 am on October 26, 2009
Use the following php function to do the job:
Source: nadeausoftware