newbie question, almost there.
Posted: Thu Nov 12, 2009 6:38 pm
Hi all, Im new to ph and this forum! I'm taking a beginners class in PHP and I'm having trouble a bit of trouble. Below is my code. I finally got the actually temp conversion to work properly, however I wanted it to be displayed in a table. One column for Celsius and for the featherweight equivalent. (or the opposite way, you get the point)
I have tried outputting to the table, with no luck tho I do think I am on the right track. Any suggestions or guidance? Thanks
I have tried outputting to the table, with no luck tho I do think I am on the right track. Any suggestions or guidance? Thanks
Code: Select all
<?php
$ctemp = -40;
print "<table>";
while ($ctemp <= 200) {
print (<tr><td>$ctemp . " °"</td>);
print (32 + $ctemp / 5 * 9 );
print (<td>" °<br/>"<br></td></tr>);
$ctemp = $ctemp + 10;
}
print "</table>";
?>