Re: count words in a document
| From: | Joe Stump | Date: | Tue, 28 Nov 2000 05:24:46 +0000 |
| Subject: | Re: count words in a document | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27552@lists.php.net to get a copy of this message | ||
$word_count = sizeof(explode(' ',striptags($text)));
--Joe
On Mon, Nov 27, 2000 at 09:12:54PM -0800, jeremy brand wrote:
> I would strip_tags(), then wc -w (or equivilant) the output.
>
> -jeremy brand
>
> On Tue, 28 Nov 2000, Benjamin Brown wrote:
>
> > Date: Tue, 28 Nov 2000 15:11:36 +1000
> > From: Benjamin Brown <benb@thetrafficcompany.com>
> > To: php-general@lists.php.net
> > Subject: [PHP] count words in a document
> >
> > Can anyone help , I need to count how many words there are in an HTML document but not
> > count any HTML tags.......
> >
> > Thanx
> >
> > Benjamin Brown
> >
> > The Traffic Company
> > www.thetrafficcompany.com
> >
> > Internet Traffic Development
> >
> > This communication is intended for the named recipients only. It is confidential and may
> > contain information which is privileged or personal. Unless expressly stated, this communication
> > does not waive legal professional privilege with respect to any material. The Traffic Company
> > disclaims all responsibility and accepts no liability for the contents of this communication unless
> > subsequently confirmed in writing. If you are not an intended recipient you must not disclose or use
> > this communication for any purpose.
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
================================================================================
= Joe Stump joestump98@yahoo.com http://www.miester.org =
================================================================================
Need a programmer? http://www.google.com/search?q=joe+stump+resume