Try to fix textarea

This commit is contained in:
2024-05-17 13:54:09 +02:00
parent a8fc530308
commit fa372fdeb8
3 changed files with 89 additions and 9 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
include_once "../../base/errors.php";
include_once "../../base/headers.php";
Headers::html();
$personen = array("Felix", "Berta", "Dalia", "Cecil", "Axel", "Elmar");
$toFind = "Cecil";
$zahlen = array(4, 7, 3, 10, 8, 1, 5);
foreach ($personen as $key => $name) {
if ($name === $toFind) {
echo "$name at $key";
break;
}
}
?>
<br />
<?php
$max = 0;
$maxKey = 0;
foreach ($zahlen as $key => $value) {
if ($value > $max) {
$max = $value;
$maxKey = $key;
}
}
echo "$max at $maxKey";
for ($i = 0; $i < 10; $i++) {
echo "$i<br/>";
}
echo "AFTER: $i<br/>";