View Full Version : making table

01-13-2013, 08:30 AM
anybody know how to make a table that has limited rows and when the data inside that is gonna be put into the table exceeds the limit of rows then the next data that will be put in another table next to the old table for example

Data1 || Data6 || Data n+1
Data2 || Data7 || Data n+1
Data3 || Data8 || Data n+1
Data4 || Data9 || Data n+1
Data5 || Data10 || Data n+1

01-13-2013, 01:02 PM
Your page has to be rendered using a server side language such as php and the generation of the tables should be controlled via an IF statement.

If data is greater than this (Data5); make a new table.

01-13-2013, 02:49 PM
i already got the php part any examples for using if on the tables?

01-14-2013, 01:18 AM
Here is some nasty and ugly code:


$counter = 0;
$limit = 5;

echo '<table style="float: left;">';
for ($i = 0; $i < 30; $i++) { // example of loop that has 30 rows to be printed
if ($counter >= $limit) {
$counter = 0;
echo '</table><table style="float: left;">';
echo '<tr><td>Data'.$i.'</td></tr>';
echo '</table>';


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum