If you’re working with various HTML in PHP, then you probably know that strim_tags doesn’t deal with all HTML code correctly. There are some problems with JS elements, with Microsoft Word HTML, etc. In order to get clean text, there is a function that holds all these exceptions. Its name is strip_tags_smart. You’re welcome to check its description here and the download link is located at dklab forum. Since the function uses GNU license, I won’t post any modified elements, you’re welcome to customize it in the way you like.
A package of PHP functions to manipulate strings encoded in UTF-8