Hallo,
Ich habe leider mal wieder ein Problem.
Also ich will z.B 8 Bilder aus DB auslesen und dann nach jeden 4 Bildern einen Absatz machen. Nur funktioniert das bei mir nicht so ganz.
Hier mein bissheriger Code:
PHP-Code:
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="forum">
<tr>
<td class="newshead">Videoclips</td>
</tr><tr><td class="leftb">
<table style="width:100%" border="0" cellspacing="1" cellpadding="0" class="leftb">
<tr>
<?php
$category=$_REQUEST["category"];
$videos=0;
$sql="SELECT id,name,preview FROM files WHERE category='$category' ORDER BY id DESC";
$data=mysql_query($sql, $db);
while ($files = mysql_fetch_object ($data)) {
$videos++; ?>
<td width="100%" class="leftb" >
<table width="200" border="0" cellpadding="0" cellspacing="1" class="dashed">
<tr>
<td class="newshead"><?php secure($files->name); ?></td>
</tr><tr><td class="leftb">
<a href="index.php?show=filesdetail&id=<?php echo $files->id ?> "><?php print "<img src=\"$files->preview\" />" ?></a>
</td>
<?php
if($videos==4)
{
print "<br \>";
}
?>
</tr></table></td>
<?php } ?>
</tr>
</table>
</td>
</tr></table>
Was hab ich das falsch? Ich habe schon verschied versucht, krieg es aber nirgendwie hin.
Kann mir da einer helfen?
Danke im Vorraus!