habe ein problem:
bekomme aus meiner datenbdank versch. daten, und will diese in einer 2-spaltigen tabelle ausgeben.
1spaltig ist kein problem, aber wie bekomme ich das in 2 spalten hin?
HILLFEE!!
hier mal mein bisheriger code:
Code: Alles auswählen
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<?php
$zaehler = 0;
$sql = "SELECT * FROM lg_bilder";
$result = mysql_query($sql);
while($arr = mysql_fetch_array($result, MYSQL_ASSOC)) {
$bild = $arr['id'];
$name = $arr['name'];
$groesse = $arr['groesse'];
$preis = $arr['preis'];
$technik = $arr['technik'];
if($arr[technik] == 1) {$technik = 'Kohle';}
if($arr[technik] == 3) {$technik = 'Kreide';}
?>
<tr valign="top">
<td rowspan="5" width="80" height="100" class="text">
<img src="../images/<?php echo($bild) ?>" width="75" height="100"></td>
<td class="text" height="20">Name: <?php echo ($name) ?></td>
<td rowspan="5" width="80" height="100" class="text"><img src="../images/<?php echo($bild) ?>" width="75" height="100"></td>
<td class="text" height="20">Name: <?php echo ($name) ?></td>
</tr>
<tr valign="top">
<td class="text" height="20">Größe: <?php echo ($groesse) ?> cm</td>
<td class="text" height="20">Größe: <?php echo ($groesse) ?> cm</td>
</tr>
<tr valign="top">
<td class="text" height="20"><?php echo ($preis) ?> €</td>
<td class="text" height="20"><?php echo ($preis) ?> €</td>
</tr>
<tr valign="top">
<td class="text" height="20"><?php echo ($technik) ?></td>
<td class="text" height="20"><?php echo ($technik) ?></td>
</tr>
<tr valign="top">
<td class="text" height="35"><img src="../images/bp.gif" width="50" height="35"></td>
<td class="text" height="35"><img src="../images/bp.gif" width="50" height="35"></td>
</tr>
<?php
$zaehler++;
}
?>
</table>