0

Hi, I'm having trouble getting this to run. basically I'm trying to get a table to display miles per gallon into liters per 100 kilometers in increments of 10. Every time i run it though, it just displays the table header without any results. Any advice would really be appreciated

<?php
//create table
echo "<table width='50%' align='center' border='1'>";
echo "<tr>
       <th>MPG</th>
       <th>KMPL</th>
       </tr>";	

for ($mpg = 10; $mpg >50; $mpg+=5)
{
	printf("<tr><td>%d </td><td>%f  <td></tr><br />", $mpg, $mpg*42.5143707);
}
echo"</table>";

?>
1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by shekki
0

the inequalities were backwards just in case anyone was wondering

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.