Question
What will be the output of the following PHP code?
< ?php
$team = "arsenal";
switch ($team) {
case "manu":
echo "I love man u";
case "arsenal":
echo "I love arsenal";
case "manc":
echo "I love manc"; }
?>
< ?php
$team = "arsenal";
switch ($team) {
case "manu":
echo "I love man u";
case "arsenal":
echo "I love arsenal";
case "manc":
echo "I love manc"; }
?>
Answer: Option C
Was this answer helpful ?
If a break statement isn't present, all subsequent case blocks will execute until a break statement is located.
Was this answer helpful ?
More Questions on This Topic :
Question 2. PHP files have a default file extension of. ....
Question 4. Who is the father of PHP? ....
Submit Solution