Monday, November 28, 2005

test.php:
$test = 1;
if ($test == 1) {
echo "Good morning.";
};
elseif ($test == 2) {
echo "Good afternoon.";
};
?>


grade.php:
$score = 45;
if ($score >= 90) {
echo "Grade is A.";
}
elseif ($score >= 80) {
echo "Grade is B.";
}
elseif ($score >= 70) {
echo "Grade is C.";
}
elseif ($score >= 60) {
echo "Grade is D.";
}
elseif ($score < 60) {
echo "Grade is F.";
};
?>

0 Comments:

Post a Comment

<< Home