首頁 >後端開發 >php教程 >關於php中的switch語句 報錯

關於php中的switch語句 報錯

WBOY
WBOY原創
2016-09-12 17:27:271094瀏覽
<code>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;
}
</code>

在運行的時候報錯>符號有誤 這是什麼情況啊

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn