"> What will be the output of the following PHP code ?<?php$n;if

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

else condition without brackets performs the following statements only.



Your comments will be displayed only after manual approval.