Hi,
If im get your question right you want to display images in a table with 5 images in a row right.
Try the below code,
this code assume that you are fetching details from a database and i didnt went througn the whole coding insteed i just demostrate here only the data fetching part.
By changing the $x value in the if condition you can specify how many columns to display in a row.
if($x==2)
{
print "</tr>";
print "<tr>";
........
Code
$x=0;
while($result=mysql_fetch_array($row))
{
$imgUrl=$rootHttpPath.$result['url'];
if($x==0)
{
print "<tr>";
}
print " <td width=\"50%\"><div align=\"center\"><img src=\"".$imgUrl."\" width=\"342\" height=\"276\">";
print "</div></td>";
$x++;
if($x==2)
{
print "</tr>";
print "<tr>";
print " <td colspan=\"2\"> </td>";
print "</tr>";
$x=0;
}
}
Hope this is what you wanted. 🙂
Regards,
Niroshan