【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-code5.15.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
$summary ="We do not live in arrears anything,
so there is no need to suffer gravely total.
Life should be grateful,
at least it gives us life,
gave us survive.";
$word = str_word_count($summary);
echo "该语句共有".$word."个单词";
echo "<br/>";
$words = str_word_count($summary,2);
$frequency = array_count_values($words);
print_r($frequency);
?>
上一篇:
code5.14.php
下一篇:
首鼠两端