当前位置:Gxlcms > PHP教程 > 关于php中的switch语句报错

关于php中的switch语句报错

时间:2021-07-01 10:21:17 帮助过:4人阅读

switch($rank)
        {
            case 1:
                $speed = 50;
            break;
            case 2:
                $speed = 48;
            break;
            case 3:
                $speed = 46;
            break;
            case 4:
                $speed = 44;
            break;
            case 5:
                $speed = 42;
            break;
            case 6:
                $speed = 40;
            break;
            case 7:
                $speed = 39;
            break;
            case 8:
                $speed = 38;
            break;
            case 9:
                $speed = 37;
            break;
            case 10:
                $speed = 36;
            break;
            case 21 > '$rand' >10:
                $speed = 35;
            break;
            case 31 > '$rand' > 20:
                $speed = 34;
            break;
            case 41 > '$rand' > 30:
                $speed = 32;
            break;
            case 71 > '$rand' > 50:
                $speed = 31;
            break;
            case 101 > '$rand' > 70:
                $speed = 30;
            break;
            case 201 > '$rand' > 100:
                $speed = 29;
            break;
            case 301 > '$rand' > 200:
                $speed = 28;
            break;
            case 401 > '$rand' > 300:
                $speed = 27;
            break;
            case 501 > '$rand' > 400:
                $speed = 26;
            break;
}

在运行的时候报错>符号有误 这是什么情况啊

人气教程排行