...

View Full Version : How to get Loop output in HTML Table?



qaiser_nazir
02-10-2010, 08:07 AM
Dear Seniors
below is the code of Maths table. But i cannot understand how can i get this out into HTML tables in an organized way.
Your help will be a great favour for me.

<?php

for ($i=1; $i<=10; $i++)
{
echo 'Tables of '.$i.'<br/>';
for($j=1; $j<=10;$j++)
{
$res=$i*$j;
echo .$i.'*'.$j.'='.$res.'<br>';
}
echo '<br/>';
}
?>

Fumigator
02-10-2010, 05:02 PM
You are creating HTML code; so just include the <table>, <tr> and <td> tags where you need them. If you are unfamiliar with these tags, visit w3schools.com and learn about how to use table tags.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum