&$v) { $newarr[$k] = explode($bianliang1, $v); } //此处用变量$bianliang1来标识第二个数组 $bianliang2='bbb'; foreach ($newarr as $k => &$v) { if(!empty($v[1])){ $newtwo[$k] = explode($bianliang2, $v[1]); } } foreach ($newtwo as $k => &$v) { $aaa[] = $v[0]; } $i = count($aaa); $ok = array_count_values ($aaa); arsort($ok); echo ''; echo "共".$i."条"; echo '
'; print_r($ok); ?>
文章题目:php日志分析小脚本,分析出每行包含相同字符串的统计数量(从大到小进行排序)
本文路径:http://cdweb.net/article/pdgego.html