Name
str_word_count
Synopsis
mixed str_word_count(stringstring
[, intformat
[, stringcharacters
]])
Counts the number of words in string using locale-specific rules. The value of format dictates the returned value:
| The number of words found in
|
| An array of all words found in
|
| An associative array, with keys
being the positions and values being the words found at
those positions in |
If characters
is specified, it
provides additional characters that are considered to be inside
words (that is, are not word boundaries).
Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.