how to calculate grade results in php
<p>this code calclate normal result
example</p>

<ul>
<li>if 1200 marks of student then showing a grade</li>
<li>if 1100 marks of student then showing a nothing</li>
<li>if 800 marks of student then showing b grade</li>
</ul>

<p>but i want like this</p>

<ul>
<li>if marks is 1200 then showing a grade</li>
<li>if marks is less then 1200 then grade showing b</li>
<li>if marks is less then 800 then showing grade c</li>
</ul>

<p>how can i do this please help me to fix this issue 
thanks</p>

<pre><code>&lt;?php
    $calculate="$marks";
    switch ($calculate)
    {
    case "1200":
       echo "A";
       break;
    case "800":
       echo "B!";
       break;
    case "600":
       echo "C";
       break;
    default:
       echo "";
    }
    ?&gt;
</code></pre>
