PHP - Farbbalken mit Farbänderung je nach Prozent
<?php
// Farbbalken mit Farbänderung je nach Prozent
if ($Prozent > 50 ) $background = " background: #390; color: #000";
if ($Prozent <= 50 ) $background = " background: #fc0; color: #000";
if ($Prozent <= 20 ) $background = " background: #c00; color: #000";
echo "<div style='width: " . $Prozent . "%;" . $background .
"; text-align: right;'>" . $Prozent . "% </div>";
?>
Bausteine Alle Anzeigen
Eine zufällige Auswahl von Bausteinen (Snippets) aus den Bereichen HTML, CSS, PHP, JavaScript und MySQL.
<html> HTML
CSS - Tastenkombinationen darstellen
PHP - Leere Arrays entfernen und Zeiger beibehalten