Thank you..actually i had this in the code but I forgot to type it here.
The thing I was looking for is Set $i=0, once it become 6.
I just found this in this forum.
Thanks again for the reply
echo"<table width=100% border =0>";
echo"<tr>";
$i=1;
while($row=mysql_fetch_array($result)){
$i++;
echo"<img src=$row[image] border=0>";
if($i %6){
echo"</tr><tr>";
[COLOR=red]$i=0;[/COLOR] <!-- this was missing -->
}
}
echo"</tr>";
echo"</table>";