I am new at writing in php, first and foremost.
I am attempting to display a list of 0-100 degrees Fahrenheit, with its equivalent value in Celsius. I made these little functions to convert the temps, but I'm stumped on how to show them side by side (or one under the other) in a list on the page. If anyone knows a good way to do this, I would be much obliged.
Code: Select all
<?php
function tempCtoF($c)
{
$f = $c * (9.0/5.0) + 32;
return $f;
}
function tempFtoC($f)
{
$c = $f * (5.0/9.0) - 32;
return $c;
}
?>