Jump to content

Display results in table


MDanz

Recommended Posts

I already have displayed results working code.  how do i display them in a table with max columns 8 and if 8 is reached a new row is started?

 

can i have example? my search has a while loop i don't know how to implement this into it without for.

 

 

 

  $construct = "SELECT * FROM castack WHERE $construct";
}              $run = mysql_query($construct);
                $foundnum = mysql_num_rows($run);
                $row_count = ceil($total / ;

echo "<table>";


if  ($foundnum==0)
echo "<br><br><font color=white>No Stacks Found</font>";
else
{
     echo "<font color=white>$foundnum <img src='http://www.asfasfaf.com/mini%20stack.jpg'> Found!</font><hr size='1'><p>";
         echo "<table>";
       while ($runrows = mysql_fetch_assoc($run))
     {
              //get data
              $id = $runrows['id'];
        $name = $runrows['name'];
        $username = $runrows['username'];




            
            
            echo "<td><a href='http://www.sfdsffafsd.com/search.php?search=$name' style='text-decoration: none';><table border='0' celpadding='0' cellspacing='0'>
<tr>
<td width='101px' height='101px' background='Stacks/template.jpg' VALIGN='middle'>
<font color=black font size=3 font face=Arial><center><b>$name</b></center></font></td>
</td>
</tr>

</table></a></td>";



            }

     

     


}    

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.