Round a Value after While Loop in PHP
Hey with the following code I am trying to round the variable $CelNum, and
since I am new to PHP I am unsure of how to do it correctly if you could
help me I would appreciate it.
<head>
<title>Temp Conversion</title>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1" />
</head>
<body>
<?
$FarNum = 0;
$CelNum = 0;
while ($FarNum <= 100)
{
$CelNum = ($FarNum - 32)*5/9;
echo "<p>$FarNum = $CelNum</p>";
$FarNum++;
}
No comments:
Post a Comment