mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-24 10:41:56 +01:00
21 lines
370 B
PHP
21 lines
370 B
PHP
|
<?php
|
||
|
$timestamp = time();
|
||
|
$datum = date("Y",$timestamp);
|
||
|
$geburtsjahr = 1922;
|
||
|
$alter = $datum-$geburtsjahr;
|
||
|
switch ($alter)
|
||
|
{
|
||
|
case 80:
|
||
|
echo "Alles Gute zum 80sten!";
|
||
|
break;
|
||
|
case 70:
|
||
|
echo "Alles Gute zum 70sten!";
|
||
|
break;
|
||
|
case 60:
|
||
|
echo "Alles Gute zum 60sten!";
|
||
|
break;
|
||
|
default:
|
||
|
echo "Du bist $alter Jahre alt.";
|
||
|
}
|
||
|
?>
|