I am trying to find a way to accept user to invoke multiple switch statements for example
$order = Read-Host "Place Order"
Switch ($order){
1{echo "Burger"}
2{echo "Fries"}
3{echo "Drink"}
}
You can only type 1, 2, or 3 but if you wanted multiple you could put it into an array
$order = @('1','2')
Switch ($order){
1{echo "Burger"}
2{echo "Fries"}
3{echo "Drink"}
}
output:
Burger
Fries
But how do I get user input and format it into an array value?