I m new in php.i want some help in my code..plz..
i have 15 image in mysql table .and i want to retreive atleast 3 images in first row.den other 3 in second row..how can i make it possible..
the code is given below..!
<?php
include "dbconfig.php";
?>
<link href="main.css" rel="stylesheet" type="text/css" />
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#BCC5C7">
<tr><?php
$results = "SELECT * FROM files WHERE menu_item_id='5' limit 5";
$Img_result = mysql_query ($results, $conn);
if (mysql_num_rows ($Img_result) >= 0){
$Img_menu = array();
while ($rows = mysql_fetch_array ($Img_result, MYSQL_ASSOC)){
$realname = $rows ['filename'];
$small_preview = 'download/wallpapers/'.$realname.'';
$large_preview = 'download/wallpapers/'.$realname.'';
?><td><?php echo "<a href='$large_preview' target='_blank'><img width='120' height='200' src='$small_preview' border='0'></a>";?>
<br /><div class="pic"><strong>Name :</strong> <?php echo $rows ['title']; ?></div></td><? } } ?></tr>
</table>