PHP - Tabelle mehrfarbig ausgeben
<table>
<?php
// Tabelle mehrfarbig ausgeben
function bgColorRotate($n, $bgColors) {
return $bgColors[$n % sizeof($bgColors)];
}
$bgColors = array('#FFDDDD', '#DDFFDD', '#DDDDFF'); // usw.
for ($i = 0; $i < 7; $i++) {
echo '<tr style="background:' . bgColorRotate($i, $bgColors) .
'"><td>' . bgColorRotate($i, $bgColors) . '</td></tr>';
}
?>
</table>
Bausteine Alle Anzeigen
Eine zufällige Auswahl von Bausteinen (Snippets) aus den Bereichen HTML, CSS, PHP, JavaScript und MySQL.
<audio> Audio-Datei
CSS - Glühende Neon Buchstaben
PHP - Header mit absoluter URL senden