ordner umbennen
This commit is contained in:
28
progp/24-12-5 -- arrays/arr.php
Normal file
28
progp/24-12-5 -- arrays/arr.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
echo "<h1>assoziativen eindimensionalen Array</h1>";
|
||||
// assoziativen eindimensionalen Array
|
||||
$anwesenheit=["Mo"=> 15, "Di" => 20];
|
||||
|
||||
echo "<h1>Ausgabe der Arrayinformation</h1>";
|
||||
// Ausgabe der Arrayinformation
|
||||
var_dump($anwesenheit);
|
||||
echo "<br>";
|
||||
|
||||
echo "<h1>hinzufügen und Ausgabe eines Elements</h1>";
|
||||
// hinzufügen und Ausgabe eines Elements
|
||||
$anwesenheit["Mi"] = 22;
|
||||
echo $anwesenheit ["Mi"]. "<br>";
|
||||
|
||||
echo "<h1>hinzufügen eines Elements und Ausgabe aller Arrayinfos inkl. Datentypen</h1>";
|
||||
// hinzufügen eines Elements und Ausgabe aller Arrayinfos inkl. Datentypen
|
||||
$anwesenheit["Do"] = 10;
|
||||
var_dump($anwesenheit);
|
||||
echo "<br>";
|
||||
|
||||
echo "<h1>Ausgabe von key und value mit einer Schleife</h1>";
|
||||
// Ausgabe von key und value mit einer Schleife
|
||||
foreach($anwesenheit as $key => $value)
|
||||
echo $key." ".$value."<br>";
|
||||
|
||||
// Ausgaben von values
|
||||
?>
|
||||
55
progp/24-12-5 -- arrays/lotto.php
Normal file
55
progp/24-12-5 -- arrays/lotto.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<div class="border-dick">
|
||||
<div class="m">
|
||||
<h1 class="">Lotto Generator</h1>
|
||||
<p class="ts-2">Ihre Glückszahlen lauten:</p>
|
||||
</div>
|
||||
<style>
|
||||
.border {
|
||||
border: 1px solid black;
|
||||
}
|
||||
.border-dick {
|
||||
border: 3px solid black;
|
||||
}
|
||||
.m{
|
||||
margin: 10px;
|
||||
}
|
||||
.p {
|
||||
padding: 25px;
|
||||
}
|
||||
.tc {
|
||||
text-align: center;
|
||||
}
|
||||
.tb {
|
||||
font-weight: bold;
|
||||
}
|
||||
.ts{
|
||||
font-size: 30;
|
||||
}
|
||||
.ts-2{
|
||||
font-size: 27;
|
||||
}
|
||||
.gz {
|
||||
background-image: linear-gradient(to right, darkgrey, white);
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
.ib {
|
||||
display: inline-flex;
|
||||
}
|
||||
.r-kreis{
|
||||
border-radius: 100%;
|
||||
}
|
||||
.hw {
|
||||
|
||||
}
|
||||
</style>
|
||||
<div class="m tc ib">
|
||||
<?php
|
||||
for ($i = 0; $i < 6; $i++) {
|
||||
$zahl = rand(1,49);
|
||||
echo "<a class='tb ts m gz r-kreis '>$zahl</a>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user