Hallo,
ich habe folgenden php code:
allerdings wird "Text2Text3" ausgegeben. Wie kommt das?
Wieso springt er in "case '2'" rein, obwohl die Variable gar nicht 2 ist?
ich habe folgenden php code:
PHP-Code:
$typ=1;
switch ($typ) {
case '0':
echo "Text1";
case '1':
echo "Text2";
case '2':
echo "Text3";
}
Wieso springt er in "case '2'" rein, obwohl die Variable gar nicht 2 ist?

Kommentar