Using str_word_count for UTF8 texts
I have this text: $text = "Başka, küskün otomobil kaçtı buraya küskün otomobil neden kaçtı kaçtı buraya, oraya KISMEN @here #there J.J.Johanson hep. Danny:Where is mom? I don't know! Café est weiß for 2 €uros. My 2nd nickname is mike18."; Recently I was using this. $a1= array_count_values(str_word_count($text, 1, 'ÇçÖöŞşİIıĞğÜü@#é߀1234567890')); arsort($a1); You can check with this fiddle: http://ideone.com/oVUGYa But this solution doesn't solve all UTF8 problems. I can't write whole UTF8 set into str_word_count as parameter. So I created this: $wordsArray = explode(" ",$text); foreach (