By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,045 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,045 IT Pros & Developers. It's quick & easy.

Dynamic 2x2 growing table

P: 63
Hi all I am working on a new project where it has to have a dynanically growing table I guess I am going to have to use loops or two array function . Every time a project is added it must appear in it table which must be growing horizontally. then jumping onto the next line when first line in full.

Thanks in advance for all replies.
Feb 1 '07 #1
Share this Question
Share on Google+
4 Replies


Motoma
Expert 2.5K+
P: 3,235
Hi all I am working on a new project where it has to have a dynanically growing table I guess I am going to have to use loops or two array function . Every time a project is added it must appear in it table which must be growing horizontally. then jumping onto the next line when first line in full.

Thanks in advance for all replies.
Okay mankolele, what is your question?
Feb 1 '07 #2

P: 63
Okay mankolele, what is your question?

How do I make a table increase each time a new project is displayed on the interface like on the interface each time there is a project posted in by an administrator it appears in a small table the details so on a row I can fit four columns. when the first row is full continue to the next.

Where do I start the loop code for that kind of out put.

Thanks
Feb 1 '07 #3

Motoma
Expert 2.5K+
P: 3,235
How do I make a table increase each time a new project is displayed on the interface like on the interface each time there is a project posted in by an administrator it appears in a small table the details so on a row I can fit four columns. when the first row is full continue to the next.

Where do I start the loop code for that kind of out put.

Thanks
Each case will vary.
The way I would do it would be to create the <TABLE> tags, then have a for-loop populate it with <TR>s and <TD>s.

[PHP]
<?php
echo "<TABLE>";
foreach($itemArray as $item)
{
echo '<TR><TD>'.$item['firstname'].'</TD><TD>'.$item['lastname'].'</TD></TR>';
}
echo "</TABLE>";
?>
[/PHP]
Feb 1 '07 #4

P: 63
Thanks for the reply am still working on it will come back as soon as I get stuck somewhere.
Feb 2 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.