Voll Upload SGD Fachinformatiker PHP
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
function dynAuswahl (string $id, string $name, array $options, bool $multiple) {
|
||||
|
||||
if ($multiple == 1) {
|
||||
|
||||
$multiple ="multiple";
|
||||
}
|
||||
|
||||
switch($id){
|
||||
|
||||
case "dynamisch1":
|
||||
echo"<select id='$id' name='$name' $multiple><br>";
|
||||
foreach($options as $wert){
|
||||
echo "\n\t\t\t\t\t<option value='$wert'>$wert</option><br>";
|
||||
}
|
||||
echo "\n\t\t\t\t</select>";
|
||||
break;
|
||||
|
||||
case "dynamisch2":
|
||||
echo"<select id='$id' name='$name' $multiple><br>";
|
||||
foreach($options as $wert){
|
||||
echo "\n\t\t\t\t\t<option value='$wert'>$wert</option><br>";
|
||||
}
|
||||
echo "\n\t\t\t\t</select>";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user