</pre><pre name="code" class="php">
/* 获取用户连续学习天数 ----传入一个数组 */
private function continuLearn($numberArray){
$str = implode('', $numberArray);
$Tokens = explode(0, $str);
$maxCount = 0;
foreach ($Tokens as $oneToken) {
if ($oneToken == '')
continue;
$length = strlen($oneToken);
if ($length > $maxCount)
$maxCount = $length;
}
return $maxCount;
}
</pre><pre name="code" class="php">