|
str_word_count文字列に使用されている単語についての情報を返す 説明
arrayint str_word_count(string
$string, int $format = 0, stringnull $characters = null)
この関数を使用するうえで、'単語' は「ロケールに依存したアルファベットから なる文字列で、その先頭以外の部分に "'" および "-" を含 めることができる」ものと定義されています。 マルチバイト文字列を使うロケールはサポートされていないので、注意が必要です。 パラメータ
戻り値
選択した 変更履歴
例
例1 str_word_count の例 上の例の出力は以下となります。
Array
(
[0] => Hello
[1] => fri
[2] => nd
[3] => you're
[4] => looking
[5] => good
[6] => today
)
Array
(
[0] => Hello
[6] => fri
[10] => nd
[14] => you're
[29] => looking
[46] => good
[51] => today
)
Array
(
[0] => Hello
[1] => fri3nd
[2] => you're
[3] => looking
[4] => good
[5] => today
)
7
参考
|