note 40212 added to function.str-word-count
| From: | billatmylgddotcom at rn2 dot php dot net | Date: | Wed, 25 Feb 2004 15:46:33 +0000 |
| Subject: | note 40212 added to function.str-word-count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65734@lists.php.net to get a copy of this message | ||
//just a little modification but....
//this one reproduce the php 4.3.0 result... (skip the numbers)
function str_word_count($text){
$text=preg_replace("/[0-9]/"," ",$text);
$wordcount=count( preg_split("/[\W]+/", $text) );
return $wordcount;
}
----
Manual Page -- http://www.php.net/manual/en/function.str-word-count.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40212
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40212&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40212&report=yes
Search -- http://master.php.net/manage/user-notes.php