Connecting Tech Pros Worldwide Forums | Help | Site Map

creating a table with 250 rows

Newbie
 
Join Date: Jul 2008
Posts: 3
#1: Jul 11 '08
i have this table i need to create with 250 rows and 4 columns, is there a shortcut to achieving that and will not be cumbersome. please help!!!!

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#2: Jul 12 '08

re: creating a table with 250 rows


Heya, moyolawal.

Expand|Select|Wrap|Line Numbers
  1. for( $i = 0; $i < 250; ++$i )
  2. {
  3.   echo '<tr>';
  4.  
  5.   for( $j = 0; $j < 4; ++$j )
  6.   {
  7.     echo '<td></td>';
  8.   }
  9.  
  10.   echo '</tr>';
  11. }
  12.  
Newbie
 
Join Date: Jul 2008
Posts: 3
#3: Jul 12 '08

re: creating a table with 250 rows


hello, thank you so much for your input. i tried the codes but did not get any result. is there something i am missing out or maybe i am to do something but not doing.
thank you.
dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,095
#4: Jul 12 '08

re: creating a table with 250 rows


Quote:

Originally Posted by moyolawal

hello, thank you so much for your input. i tried the codes but did not get any result. is there something i am missing out or maybe i am to do something but not doing.
thank you.

Did you put any text between the <td></td> tags?

Table is empty because you left it empty.
Newbie
 
Join Date: Jul 2008
Posts: 3
#5: Jul 12 '08

re: creating a table with 250 rows


thank you so much. i have been on this for a while and really bad with tables.
i have the table created and i still have some hiccups. each cell is to have a value inputted by the user and then a sum of all the values in one column will be assigned to a variable. this will be done for all the columns. could u help with this pls.
thank you.
Reply