Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $num = 5;
    if ($num == 6)
    print "Interveiw" ;
    else if($num = 6)
    print $num;
    else
    print "Mania";
    ?>
    1. 6
    2. 5
    3. Mania
    4. Interview
    5. None of these
Correct Option: A

Enters if else as first condition is false and thus num is set to 6.



Your comments will be displayed only after manual approval.