[ create a new paste ] login | about

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

PHP, pasted on Aug 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
    $str = '<html>
<body>
<![CDATA[
alert alert
]]>
<h1> This is the title </h1>
<!--
alert
alert
-->
<p> some description text here, <b>this</b> is a word. </p>
</body>
</html>';

    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
(
    [this] => 2
    [is] => 2
    [the] => 1
    [title] => 1
    [some] => 1
    [description] => 1
    [text] => 1
    [here] => 1
    [a] => 1
    [word] => 1
)


Create a new paste based on this one


Comments: