Verzweigungen
Abschlussbedingungen
if ($condition) {
# Code to execute if the condition is true
} elseif ($anotherCondition) {
# Code to execute if the second condition is true
} else {
# Code to execute if no conditions are true
}
switch ($variable) {
'Condition1' {
# Code for Condition1
break
}
'Condition2' {
# Code for Condition2
break
}
default {
# Default code block
}
}
Zuletzt geändert: Samstag, 20. April 2024, 12:15