php如何判断英文句子的单词个数

2010年05月31日  |  14:36分类:PHP技术  |  标签:  |  608 views

今天遇到一个要判断英文句子的个数的问题,一查,发现php中有一个函数可以直接用:

那就是函数str_word_count(string Str)

参数是字符串,输出该字符串中单词的个数。

注意:判断的英文应该是标准的有空格的英文句子。

喜欢本文,那就收藏到: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

发表您的评论

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word