graham23s Posted September 3, 2007 Share Posted September 3, 2007 Hi Guys, i can display my categories fine using this code: echo '<br /> <table width="750" border="2" bordercolor="#004E98" cellpadding="5" cellspacing="0"> <tr> <td colspan="5" bgcolor="#004E98"><img src="images/browse_categories.bmp"></td> </tr>'; while ($category = mysql_fetch_assoc($query_browse)) { $cat_id_gif = $category['id']; if ($count == 5) { echo '<tr>'; $count = 0; } echo '<td class="release" align="release"><b><a href="browse.php?cat_id='.$category['id'].'">'.$category['name'].'</b></a></td>'; $count++; } echo '</tr></table>'; only thing is say i have 2 table cells empty, in firefox its a jumbled mess , it better in interntet exlorer just, basically i need to place a: to fill up the empty cell to keep it stable but im not sure where in the code to do it any help would be appreciated Graham Link to comment https://forums.phpfreaks.com/topic/67803-solved-displaying-categories/ Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Share Posted September 3, 2007 right after <tr>. echo it rightgt there. Link to comment https://forums.phpfreaks.com/topic/67803-solved-displaying-categories/#findComment-340716 Share on other sites More sharing options...
sasa Posted September 3, 2007 Share Posted September 3, 2007 ... echo '<td class="release" align="release"><b><a href="browse.php?cat_id='.$category['id'].'">'.$category['name'].'</b></a></td>'; $count++; } //insert line if($count > 1) for($I = $count; $i <= 5; $i++)echo '<td> </td>'; echo '</tr></table>'; Link to comment https://forums.phpfreaks.com/topic/67803-solved-displaying-categories/#findComment-340743 Share on other sites More sharing options...
graham23s Posted September 3, 2007 Author Share Posted September 3, 2007 thanks sasa worked great:) Graham Link to comment https://forums.phpfreaks.com/topic/67803-solved-displaying-categories/#findComment-340786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.