Mega Code Archive
Categories
/
Php
/
Statement
Fahrenheit and Celsius table by while loop
$fahr = -50; $stop_fahr = 50; print '
'; print '
Fahrenheit
Celsius
'; while ($fahr <= $stop_fahr) { $celsius = ($fahr - 32) * 5 / 9; print "
$fahr
$celsius
"; $fahr += 5; } print '
';