Voll Upload SGD Fachinformatiker PHP

This commit is contained in:
2026-06-03 13:46:32 +00:00
parent 1256ec2190
commit 84a568d89c
265 changed files with 9961 additions and 2 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
$geradeZahlen = [];
$element = 0;
for ($i = 1; $i <= 10; $i++) {
if ($i % 2 == 0) {
$geradeZahlen[$element] = $i;
$element++;
}
}
echo "<ol>";
foreach ($geradeZahlen as $schluessel=>$wert) {
echo "<li>Das Element mit dem Index $schluessel hat den Wert <b>$wert</b>.</li>";
}
echo "</ol>";
//Jetzt wird gemischt
echo "<p>Jetzt wird gemischt!</p>";
if(shuffle($geradeZahlen)) {
echo "<ol>";
foreach ($geradeZahlen as $schluessel=>$wert) {
echo "<li>Das Element mit dem Index $schluessel hat den Wert <b>$wert</b>.</li>";
}
echo "</ol>";
}
?>