Re: Class for determining word count, ignoring HTML?

From: Date: Sat, 20 Nov 2004 23:15:16 +0000
Subject: Re: Class for determining word count, ignoring HTML?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202573@lists.php.net to get a copy of this message
Murray @ Planetthoughtful wrote:
Hi All, Just wondering if anyone knows of a class that can perform a word count of text in a string that ignores HTML? IE, something that would correctly determine that the following string is 6 words long: "<blockquote> This string is six words long. </blockuote>" If such a beastie exists, I'd very much appreciate being pointed towards it. Much warmth, Murray <http://www.planetthoughtful.org/> http://www.planetthoughtful.org Building a thoughtful planet, One quirky comment at a time. echo str_word_count(strip_tags($string));


« previous php.general (#202573) next »