[ create a new paste ] login | about

Link: http://codepad.org/4KI2ub5p    [ raw code | output | fork ]

PHP, pasted on Aug 15:
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)));
?>


Output:
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
)


Create a new paste based on this one


Comments: