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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.