Home > Backend Development > PHP Tutorial > About the switch statement in php error reporting

About the switch statement in php error reporting

WBOY
Release: 2016-09-12 17:27:27
Original
1093 people have browsed it
<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>
Copy after login

An error message appears when running: The symbol is incorrect. What is going on?

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template