053.php

<?php
echo "<p>".basename($_SERVER['SCRIPT_FILENAME'])."</p>";
// Assoziatives Array definieren
$weekday = array(
    "mo" => "Montag",
    "di" => "Dienstag",
    "mi" => "Mittwoch",
    "do" => "Donnerstag",
    "fr" => "Freitag",
    "sa" => "Samstag",
    "so" => "Sonntag");
// assoziatives Array mit foreach ausgeben
// $ds (dayshort), $dl (daylong)
foreach($weekday as $ds => $dl) {
    echo $ds . " = " . $dl;
    echo "<br>";
  }
?> 
Nach oben scrollen