Hello All,
It's been a while and I've been busy coding. I'm having problems with some functions that I've written, mainly that they just won't run. if I take the code out of the function it runs fine and returns the correct values. Here's an abbreviated look at what I'm trying to do:
function getForty(){
if ($event1 <= "4.98"){
$raforty = "100";
} else if ($event1 >= "4.99" && $event1 < "5.19"){
$raforty = "95";
} else if ($event1 >= "5.19" && $event1 < "5.39"){
$raforty = "90";
} else if ($event1 >= "5.39" && $event1 < "5.59"){
$raforty = "85";
}
return $raforty;
}
$score is pulled from mysql db and is being set as I have it echoed to the page and can see it .
$event1 = $score;
getForty($event1);
echo"$raforty";
The whole thing is a lot bigger with several similar functions but they just won't run. It's probably something small and stupid but I can't seem to figure it out. Thanks in advance.