Показать выпадающий список

str_word_count()

« str_split | strcasecmp »
<?php
$mixed 
str_word_count (
    
// string $string
    
?// [int $format = 0]
    
  // [string $charlist]
);
?>
Результат
$mixed = [
  
=> 'Hello',
  
=> 'fri',
  
=> 'nd',
  
=> 'you\'re',
  
=> 'looking',
  
=> 'good',
  
=> 'today',
]
Примеры
#1 str_word_count  ("Hello fri3nd, you're looking good today!",
 
1)
#2 str_word_count  ("Hello fri3nd, you're looking good today!",
 
2)
#3 str_word_count  ("Hello fri3nd, you're looking good today!",
 
1,
 
"àáãç3")
См. также
count_chars, explode, preg_split, substr_count