note 64296 rejected from function.str-word-count by bjori
| From: | bjori@php.net | Date: | Tue, 11 Apr 2006 21:12:11 +0000 |
| Subject: | note 64296 rejected from function.str-word-count by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107813@lists.php.net to get a copy of this message | ||
Note Submitter: axion at optonline dot net
----
(This might be an amateur mistake but...) I think it is worth noting that the first option listed
for the optional 'format' parameter: 0 - returns the number of words found
is misleading, this works:
<?php $a = str_word_count($string); ?>
(returns the integer word count)
this doesn't:
<?php $a = str_word_count($string, 0); ?>
(returns an error)
Found this on PHP v4.4.1, hope this hasn't been posted.