Código PHP:
  
<table>
 
<?php while ($row=mysql_fetch_assoc($sql)) {?>
<tr>
<td><a href="<?php echo $row['imagen']; ?>" rel="lytebox[vacation]"  title="<?php echo $row['descripcion']; ?>"><img src="<?php echo $row['imagen']; ?>" width="100" height="100"/></td>
</tr>
<tr>
<td><?php echo $row['titulo'];?></td>
</tr>
<?php }?>
</table>   Código PHP:
  
<table><tr>
 
<?php $i= 0;
while($row= mysql_fetch_array($sql))
{
    if($i%3==0)
    {
       echo "<td>"<a href="<?php echo $row['imagen']; ?>" rel="lytebox[vacation]"  title="<?php echo $row['descripcion']; ?>"><img src="<?php echo $row['imagen']; ?>" width="100" height="100"/>"</td></tr><tr>";
    }
    else {
       echo "<td>"<?php echo $row['titulo'];?>"</td>";
    }
     $i++;
}
?>
 
</tr></table>    
 


