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