Moin Leutz^^
Also bei meinem Problem finde ich keine lösung :/
PHP soll mir die tabelle so ausgeben
gruppe1|gruppe2|gruppe3|gruppe4
gruppe1|gruppe2|gruppe3|gruppe4
und das ganze soll er mir 5 mal untereinander ausgeben
leider ist nicht jede Gruppe mit 5 leute ausgestatet .
Das hiesse z.B. das gruppe 1 4 haben könnte und der rest vllt 5 dann sollte bei 1 einfach ne leere tabelle bleiben und der rest weiter bis 5 ausgegeben :o
PHP-Code:
<?php
$gruppen= mysql_query("SELECT
id,
name,
klasse,
gruppe,
datum
FROM
$dbtabelle
WHERE
datum=$rowalles[datum] AND
gruppe IN (1,2,3,4)
ORDER BY
gruppe, datum DESC
");
?>
<table cellpadding="0" cellspacing="0" align="center" class="aktuell">
<tr>
<td class="trenner_links"></td>
<td class="content"><font size="5">blub - 18:45</font><br />
Vorraussichtliche Aufstellung zu Beginn<br /><br />
<table cellpadding="0" cellspacing="0" align="center" colspan='4'>
<tr>
<td class="grau" width="150"><b>Gruppe 1</b></td>
<td class="grau" width="150"><b>Gruppe 2</b></td>
<td class="grau" width="150"><b>Gruppe 3</b></td>
<td class="grau" width="150"><b>Gruppe 4</b></td>
</tr>
<tr><td>
<?php
echo '<table>';
for ($i = 0; $i < 6; $i++) {
while($rowg=mysql_fetch_array($gruppen)){
if ($i % 3 == 0)
echo '<tr>';
echo " <td> $rowg[gruppe] </td> ";
if ($i % 3 == 2 || $i + 1 == 6)
echo '</tr>';
}}
echo '</table>';
?>