Simple coding for calculating the grade in PHP
I am fresh in PHP, I need a simple coding for calculating the grade in PHP. This is for me to understand the functions used.
I am fresh in PHP, I need a simple coding for calculating the grade in PHP. This is for me to understand the functions used.
Hi Carr, as usual the concept behind every program is same. In different languages you just have to change the syntax. That's all. I recommend you to study programming language c for your basic concept. If your basic is clear then you can go a long way in programming. I have attached a file for your grade program which is a combination of HTML and PHP code. I hope that you know what HTML code is. Good luck.
Hi,
If you know language like C and others, just what logic you use in that languages same logic you have to use over here.
Just syntax is changed.
Follow this example.
<?php
$marks=1000;
$calculate = $marks;
if ($calculate < 800) {
   echo "C";
} else if ($calculate < 1200) {
   echo "B!";
} else if ($calculate == 1200) {
   echo "A";
}
?>
Â