"> What will be the output of the following PHP code ?<?php$num

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

No else statement to end the if statement.



Your comments will be displayed only after manual approval.