警告:count()期望参数2为整数,数组在给定

时间:2019-04-27 18:46:55

标签: phpcodesniffer

function getRoom($day, $number)
{

    global $class, $room;
    $result = 0;
    $max = count($class[$number]);

    for($i = 0; $i < $max; $i++)
    {
        $var = $class[$number][$i];
        $result += count($room[$day][$var]);
    }
    return $result;
}
$result += count($room[$day][$var]); 

0 个答案:

没有答案