slipondajimmy Posted March 19, 2007 Share Posted March 19, 2007 Hey everyone. Im having a issue. I need figure out how to get this code to display what I need. It will be displaying avatars, and I only want it to show 4 per row, then start a new row. What is it that I need to do? It ill currently display the avatars, but once it get more then 4 it just all bunches up instead of starting another row. Any ideas? And im sure im not making any sense but maybe someone can figure it out. echo "<tr><td rowspan='4' colspan='4' align='center'>"; echo "<img src=\"".$xoopsConfig['xoops_url']."/images/avatar/".$zavatar."\" name=\"avatar\" id=\"avatar\"><br />"; echo "<a href='/members/userinfo.php?uid=$zuid'>".ucfirst($zuname)."</a>"; echo "</td></tr>"; Link to comment https://forums.phpfreaks.com/topic/43316-need-a-little-help-with-tables/ Share on other sites More sharing options...
fert Posted March 19, 2007 Share Posted March 19, 2007 use a for loop Link to comment https://forums.phpfreaks.com/topic/43316-need-a-little-help-with-tables/#findComment-210326 Share on other sites More sharing options...
slipondajimmy Posted March 19, 2007 Author Share Posted March 19, 2007 Thanks. Im not very good with this so can someone tell me how I should do this? Link to comment https://forums.phpfreaks.com/topic/43316-need-a-little-help-with-tables/#findComment-210331 Share on other sites More sharing options...
fert Posted March 19, 2007 Share Posted March 19, 2007 for($i=0;$i<3;$i++) { echo "<tr><td rowspan='4' colspan='4' align='center'>"; echo "<img src=\"".$xoopsConfig['xoops_url']."/images/avatar/".$zavatar."\" name=\"avatar\" id=\"avatar\"><br />"; echo "<a href='/members/userinfo.php?uid=$zuid'>".ucfirst($zuname)."</a>"; echo "</td></tr>"; } Link to comment https://forums.phpfreaks.com/topic/43316-need-a-little-help-with-tables/#findComment-210333 Share on other sites More sharing options...
slipondajimmy Posted March 19, 2007 Author Share Posted March 19, 2007 Thanks It still does not work 100% im going to look at it a bit more and see what I can figure out Link to comment https://forums.phpfreaks.com/topic/43316-need-a-little-help-with-tables/#findComment-210408 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.