payney Posted January 9, 2008 Share Posted January 9, 2008 Hi guys, I have not got a clue why this is not working. Please help Basically, all I want to do is display the output in some rows. This is the code: if (mysql_num_rows($result) > 0) { echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>"; while($row = mysql_fetch_array($result)) echo "a"; echo "<tr>"; echo "<td width='47' height='35' align='center' valign='middle' class='forum_bottom'><div align='center'><img src='forum/templates/subSilver/images/folder_big.gif' width='46' height='25' align='absmiddle' /></div></td>"; echo "<td width='1106' valign='top' class='forum_bottom'>".$row['topic_title']."</td>"; echo "</tr>"; } echo "</table>"; Just to confirm, echo "a" is echoing the correct amount of times, Only ONE row is being displayed, in this one row is just the image. Thats it. You can see the result here: http://www.methleyroyals.co.uk/university/f_temp2.php Link to comment https://forums.phpfreaks.com/topic/85228-display-data-in-a-table-help/ Share on other sites More sharing options...
revraz Posted January 9, 2008 Share Posted January 9, 2008 Missing a { here? while($row = mysql_fetch_array($result)) Missing the closing one too. Link to comment https://forums.phpfreaks.com/topic/85228-display-data-in-a-table-help/#findComment-434801 Share on other sites More sharing options...
payney Posted January 9, 2008 Author Share Posted January 9, 2008 Bugger! Was missing 2 of them, cheers matey Link to comment https://forums.phpfreaks.com/topic/85228-display-data-in-a-table-help/#findComment-434806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.