I'm not quite used to the syntax of performing arithmetic operations on variables in PHP. Below is my code. I think it's pretty obvious what I'm trying to do based on the code, but I just don't know how to format it correctly in PHP.
Any help is GREATLY appreciated! $temp is a variable passed in by a form.
<?php
if($temp > "271.16") {
$ratio == "12+2*(271.16-$temp)";
}
$ratio == "12+(271.16-$temp)";
print "The snow to liquid ratio is $ratio";
?>
Any help is GREATLY appreciated! $temp is a variable passed in by a form.
<?php
if($temp > "271.16") {
$ratio == "12+2*(271.16-$temp)";
}
$ratio == "12+(271.16-$temp)";
print "The snow to liquid ratio is $ratio";
?>