How do I make the average result turn red if its value is less than 20?
Follow the code:
<?php
function media($p1,$p2,$p3) {
$resultado = ($p1 + $p2 + $p3)/3;
return $resultado;
}
$aluno[0]["nome"] = "Ryan";
$aluno[0]["media"] = media(10,20,30);
$aluno[1]["nome"] = "Mikhaela";
$aluno[1]["media"] = media(40,50,60);
for($i=0;$i<count($aluno);$i++){
echo "<b> Nome do Aluno </b>".$aluno[$i]["nome"]."<br>";
echo "<b> A media do Aluno e </b>".$aluno[$i]["media"]."<br><br>";
}
?>