wmguk Posted August 10, 2009 Share Posted August 10, 2009 Hey, Can anyone help me, I have a table on my site, and I need to display 3 products per row, and 3 rows per page (total of 9 items) This is my code so far... <table width="900" border="0" cellspacing="0" cellpadding="0"> <?php while($row_prod=mysql_fetch_array($result_prod)){ $pid = $row_prod['pid']; $name = $row_prod['name']; $desc = $row_prod['desc']; $price = $row_prod['price']; $image = $row_prod['image']; } ?> <tr> <td width="100" rowspan="2"><img src="items/<?php echo $photo ; ?>" width="100" height="100" /></td> <td width="200" height="80" align="left" valign="top"><p><span class="style22"><?php echo $name ; ?></span><br /> <span class="style20"><?php echo $desc ; ?></span><br /> </p></td> <td width="100" rowspan="2" align="left" valign="top"> </td> <td width="200" align="left" valign="top"> </td> <td width="100" rowspan="2" align="left" valign="top"> </td> <td width="200" align="left" valign="top"> </td> </tr> <tr> <td height="20" align="left" valign="top"><span class="style14">£<?php echo $price ; ?></span></td> <td align="left" valign="top"> </td> <td align="left" valign="top"> </td> </tr> <? } ?> </table> any ideas how to reduce it to 3 items wide? Quote Link to comment https://forums.phpfreaks.com/topic/169645-solved-help-with-getting-3-columns/ Share on other sites More sharing options...
wmguk Posted August 11, 2009 Author Share Posted August 11, 2009 any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/169645-solved-help-with-getting-3-columns/#findComment-895402 Share on other sites More sharing options...
wildteen88 Posted August 11, 2009 Share Posted August 11, 2009 Have a read of this FAQ post Quote Link to comment https://forums.phpfreaks.com/topic/169645-solved-help-with-getting-3-columns/#findComment-895541 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.