Showing results in rows of 3?

I have been trying to do this for 3 days now, though i do not know how to word it.

My page currently looks like this http://www.sketchedneo.com//shields.php

Though i want the Shields to show in a row like this

Shield Shield Shield
css code css code css code
html code html code html code
direct url direct url direct url

instead of

Sheild
css code
html code
direct url

Sheild
css code
html code
direct url

An example of what I mean compared to my url is http://www.sunnyneo.com/shields.php

My current code is.

[php] $num = mysql_num_rows(mysql_query(“SELECT id FROM acshields WHERE checked = 1”));

if ($num <= 0)
{
echo "

There are no acshields at this time :(";
}$sort = mysql_query(“SELECT * FROM acshields WHERE checked = 1 ORDER BY id”);
while($sort2 = mysql_fetch_array($sort))

{

if($sort2[id]){

echo("

CSS Code: <br>
<textarea><style>

#userinfo .contentModuleContent {
background-image: url("$sort2[url]");
background-repeat: no-repeat;
background-position: top right;
}
#userinfo .medText img {
visibility: hidden;
}
#userinfo .medText table table img {
visibility: visible;
}

  HTML Code: <br>
<textarea><img src=\"$sort2[url]\">
</textarea><p>
    URL: <br>
<textarea>$sort2[url]
</textarea>  </center></td>
$sort2[name] || Made by: $sort2[madeby]

"); }

}[/php]

Can some please help me with the code i need so it will show my shields in a html table row of 3

If I got it right, what about just doing kind of

while($sort2a = mysql_fetch_array($sort))
{
$sort2b = mysql_fetch_array($sort);
$sort2c = mysql_fetch_array($sort);
// and then something like
echo '<tr><td>'.$sort2a['img'].'<br>.'$sort2a['name'].'<br><textarea>.'$sort2a['css'].'</textarea></td>'.
'<td>'.$sort2b['img'].'<br>.'$sort2b['name'].'<br><textarea>.'$sort2b['css'].'</textarea></td>'.
'<td>'.$sort2c['img'].'<br>.'$sort2c['name'].'<br><textarea>.'$sort2c['css'].'</textarea></td></tr>';
}

Of course, you would need to do some checkups, if the rows exists (if not, mysql_fetch_array returns false). But imho it could work like that. I hope you know what I mean

Sponsor our Newsletter | Privacy Policy | Terms of Service