|
<?php echo "<p>".date("d.m.Y")."</p>"; echo "<p>".date("l d. F Y H:i:s")."</p>";
$jahr = date("Y"); echo "<p>".date("H:i")."</p>";
$tag = date("N");
echo "Zufallszahl: ".rand(1,10); |
11.12.2025 Thursday 11. December 2025 23:09:20 202523:09 Tagesnummer: 4 Zufallszahl: 2 |
Datumsausgabe auf Deutsch
|
<?php setlocale(LC_TIME, "de_DE"); echo "Heute ist "; echo strftime("%A"); echo "."; ?> Der Monats- und Wochentagsname wird entsprechend des per setlocale() eingestellten Wertes gesetzt. | Heute ist Donnerstag. |
setlocale — Setzt Locale Informationen
Beschreibung
string setlocale ( int $category , string $locale [, string $... ] )
string setlocale ( int $category , array $locale )