欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

关于php中的switch语句 报错

程序员文章站 2022-04-26 11:58:29
...
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;
}

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

相关标签: php