php str_word_count () function syntax

php str_word_count () function syntax

Effect: the number of words in the string is calculated. Marble level specification

语法:str_word_count(string,return,char)

parameter:

parameter description
string essential. Specifies the string to check.
return Optional. Predetermined the str_word_count () function return value. Possible values: 0 - default. Returns the number of words found. 1-- Returns an array of the word string. 2 - Returns an array, wherein the key name is the position of the word in the string, it is the actual key word.
char Optional. The provisions of special characters is considered a word.

Description: Number of words in a string is calculated.

php str_word_count () function examples

<?php
echo str_word_count("I love php!");
?>

Guess you like

Origin www.cnblogs.com/furuihua/p/11898357.html