1 2 3 4 5
<?php $str = '<h1>Hello</h1> this will show <a href="balh.html">word</a> count of all word used this time... hello!'; print_r(array_count_values(str_word_count(strip_tags(strtolower($str)), 1))); ?>
1 2 3 4 5 6 7 8 9 10 11 12 13
Array ( [hello] => 2 [this] => 2 [will] => 1 [show] => 1 [word] => 2 [count] => 1 [of] => 1 [all] => 1 [used] => 1 [time] => 1 )