Jump to content

Display data in a table help


payney

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.