الكود نفس هالفكرة
كود PHP:
$count = 0;
while (list($secid, $secname, $image) = sql_fetch_row($result, $dbi)) {
if ($count==2) {
echo "<tr>";
$count = 0;
}
echo "<td><a href=\"modules.php?name=$module_name&op=listarticles&secid=$secid\"><img src=\"images/sections/$image\" border=\"0\" Alt=\"$secname\"></a>";
$count++;
if ($count==2) {
echo "</tr>";
}
echo "</td>";
}
echo "</table></center>";