Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-10-2010, 07:07 AM   PM User | #1
qaiser_nazir
New to the CF scene

 
Join Date: Jan 2010
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
qaiser_nazir is an unknown quantity at this point
Question How to get Loop output in HTML Table?

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/>';
}
?>
qaiser_nazir is offline   Reply With Quote
Old 02-10-2010, 04:02 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
__________________
Fumigator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:21 PM.


Advertisement
Log in to turn off these ads.