1
2<?php
3switch ($i) {
4 case "apple":
5 echo "i is apple";
6 break;
7 case "bar":
8 echo "i is bar";
9 break;
10 case "cake":
11 echo "i is cake";
12 break;
13}
14?>
15
16
1switch ($i) {
2 case 0:
3 echo "i ist gleich 0";
4 break;
5 case 1:
6 echo "i ist gleich 1";
7 break;
8 case 2:
9 echo "i ist gleich 2";
10 break;
11}
1<?php
2switch ($i) {
3 case "apple":
4 echo "i is apple";
5 break;
6 case "bar":
7 echo "i is bar";
8 break;
9 case "cake":
10 echo "i is cake";
11 break;
12}
13?>