What Will Be The Output Of The Following Php Codep Pre Langphp #25
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $team = "arsenal"; switch ($team) { case "manu": echo "I love man u"; case "arsenal": echo "I love arsenal"; case "manc": echo "I love manc"; } ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Basics - PHP Basics - Quiz No.3.
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"; } ?>
I love arsenal
Error
I love arsenalI love manc
I love arsenalI love mancI love manu