Hallo,
wie kann man HTML-tabellen mehrfarbig darstellen nach dem vorbild:
http://www.php.de/html-usability-und-barrierefreiheit/19968-jede-zweite-zeile-einer-tabelle-farbig.html
hab des jetzt mal versucht, bei mir einzubauen:
<?php
$con_id = mysql_connect("localhost", "sven", "test");
mysql_select_db("testdaten");
$id = mysql_query('SELECT * FROM test');
echo "<table border='1'>
<tr>
<th>id</th>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Ort</th>
<th>Bemerkung</th>
</tr>";
$i = '1';
while($row = mysql_fetch_object($id))
{
echo "
'<tr tr class="zeile'.($i % 2 ).'> <<<<<<<< HIER
<td class='id'>
$i
</td>";
echo "
<td class='datum'>
$row->date
</td>";
echo "
<td class='zeit'>
$row->time
</td>";
echo "
<td class='ort'>
$row->place
</td>";
echo "
<td class='sonstiges'>
$row->sonst
</td>
</tr>
";
$i++;
}
echo "</table>";
mysql_close($con_id);
?>
<p />
allerdings haperts an den "", bzw '' siehe Markierung
wie kann ich des besser machen?