"/>
Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. 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";

    }

    ?>

  2. A.

     I love arsenal

    B.

     Error

    C.

     I love arsenalI love manc

    D.

     I love arsenalI love mancI love manu

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    If a break statement isn’t present, all subsequent case blocks will execute until a break statement is located.


Be The First To Comment