Ik heb nu de volgende (gore) code, welke resultaten weergeeft in een tabel. Maar ik zou deze graag in mooie divjes willen opbouwen: 3 kolommen en X aantal rijen. Afbeelding met titel erbij.
Is dit op een hele simpele manier te doen?
thnx!
<table border="0" align="center" cellpadding="2" cellspacing="0">
<?php
$horiz=3; // Dit is het aantal naast elkaar
$start=0;
include '../library/config.php';
include '../library/opendb.php';
$result=mysql_query ("select * from upload");
while ($myrow = mysql_fetch_array ($result))
{
if(($start % $horiz) == 0)
{?>
<tr align="left" valign="top">
<?php } ?>
<td><p>
<a href="<? echo "../image/$myrow[name]"; ?>" rel="lightbox" title="<? echo $myrow['label'] ?>" > <? echo '<img class=scale src="../image/' . $myrow['name'] . '" />' ; ?>
<br />
</a><span class="style1"><? echo $myrow['label'] ?></span></p> </td>
<?
$start++;
if(($start % $horiz) == 0)
{?>
</tr>
<tr align="left" valign="top">
<td height="8"> </td>
</tr>
<?
}
}
if(($start % $horiz) != 0)
{
?>
<?}?>
</table>