"> 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 = 15;
    if (print $num)
    print "Interview";
    else
    print "Mania";
    ?>
    1. Nothing
    2. Interview
    3. Mania
    4. 15Interview
    5. 15Mania
Correct Option: D

print returns 1 if it prints anything.



Your comments will be displayed only after manual approval.