Jump to content

[SOLVED] 2 tr's in a query


nathanmaxsonadil

Recommended Posts

I have a html table and a database and I want a database to fill in the html table but I have to tr's

here's my code

$result = mysql_query('SELECT * FROM sites LIMIT 4') or die('Could not connect: ' . mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<tr><td width='50%' valign='top'>
<div>
<a href='{$row['href']}'>
<img style='border:0;' src='siteimg/{$row['img']}' alt='{$row['alt']}'/>
<br/>
{$row['url']}
</a>
</div>
</td></tr>";

this works however it just has 1 tr for the whole list I want to have half in on tr and half in the other

 

 

Link to comment
https://forums.phpfreaks.com/topic/65903-solved-2-trs-in-a-query/
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.