Forum Moderators: coopster
php Code:
<?php $sql = "select wallpaperid, title, date, rating from wallpaper order by downloads desc limit 0,10"; $result = mysql_query($sql ,$db); if ($myrow = mysql_fetch_array($result)) { do { if ($rowcolor == 1) { printf("<table width='200px' cellspacing='0' cellpadding='0'> <tr> <td><img src='%s'/></td> </tr></table>", $myrow["wallpaperid"]); } while ($myrow = mysql_fetch_array($result)); } ?>
its output is
Image1
Image2
Image3
Image4
Image5
Image6
blah blah......
can anyone tell me how i can get the below output
Image1 Image2 Image3
Image4 Image5 Image6
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
<img src="image.jpg" style="width:66px">
</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
<div style="float:left;width:66px><img src="image.jpg"><br>Caption</div>
</div>