Faster way to check if integer is in any of ranges?
<p>I wonder if there is another way to shorten this ? Here is the example im looking for to do same thing just shorter.</p>

<pre><code>if($c &lt;= 100){
    echo 'A';
}elseif($c &lt;= 200 &amp;&amp; $c &gt; 100){
    echo 'B';
}elseif($c &lt;= 300 &amp;&amp; $c &gt; 200){
    echo 'C';
}elseif($c &lt;= 400 &amp;&amp; $c &gt; 300){
    echo 'D';
}elseif($c &lt;= 500 &amp;&amp; $c &gt; 400){
    echo 'E';
}elseif($c &lt;= 600 &amp;&amp; $c &gt; 500){
    echo 'F';
}elseif($c &lt;= 700 &amp;&amp; $c &gt; 600){
    echo 'Z';
}elseif($c &lt;= 800 &amp;&amp; $c &gt; 700){
    echo 'H';
}elseif($c &lt;= 900 &amp;&amp; $c &gt; 800){
    echo 'I';
}elseif($c &lt; 1000 &amp;&amp; $c &gt; 900){
    echo 'K';
}elseif($c &lt;= 1100 &amp;&amp; $c &gt; 1000){
    echo 'L';
}elseif($c &lt;= 1200 &amp;&amp; $c &gt; 1100){
    echo 'M';
}elseif($c &lt; 1300 &amp;&amp; $c &gt; 1200){
    echo 'N';
}elseif($c &lt;= 1400 &amp;&amp; $c &gt; 1300){
    echo 'O';
}elseif($c &lt;= 1500 &amp;&amp; $c &gt; 1400){
    echo 'P';
}elseif($c &lt;= 1600 &amp;&amp; $c &gt; 1500){
    echo 'Q';
}elseif($c &lt;= 1700 &amp;&amp; $c &gt; 1600){
    echo 'R';
}elseif($c &lt;= 1800 &amp;&amp; $c &gt; 1700){
    echo 'S';
}elseif($c &lt;= 1900 &amp;&amp; $c &gt; 1800){
    echo 'T';
}elseif($c &lt;= 2000 &amp;&amp; $c &gt; 1900){
    echo 'V';
}elseif($c &lt;= 2100 &amp;&amp; $c &gt; 2000){
    echo 'X';
}else{
    echo 'AA';
}
</code></pre>
