"> 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 = 12;
    if (echo $num)
    print "True";
    else
    print "False";
    ?>
    1. 0
    2. 1
    3. True
    4. False
    5. Error
Correct Option: E

echo does not return anything so if condition is empty.



Your comments will be displayed only after manual approval.