2012年6月26日

[php]substr_count---在一定范围内统计要查找的字符串在另一字符串出现的次数

摘要: <?php$text='This is a test';echostrlen($text);// 14echosubstr_count($text,'is');// 2// the string is reduced to 's is a test', so it prints 1echosubstr_count($text,'is',3);// the text is reduced to 's i', so it prints 0echosubstr_count($text,'is',3, 阅读全文

posted @ 2012-06-26 16:28 小林--2012 阅读(337) 评论(0) 推荐(0)

导航