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
https://forums.phpfreaks.com/topic/171916-display-results-in-table/
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.