Sunday, 18 August 2013

How to count word using str_word_count() when meet string unicode?

How to count word using str_word_count() when meet string unicode?

I have a sample code:
$Tags = 'Hello, chào buổi sáng';
$word = str_word_count($Tags);
echo $word;
result is 7, but how to result is 4 ([0] => "hello,", [1] => "chào", [2]
=> "buổi", [3] => "sáng")

No comments:

Post a Comment