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

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $p = 25;
    $q = 50;
    $r = 15;
    if ($p / $q / $r)
    print "Interview";
    else
    print "Mania";
    ?>
    1. true
    2. False
    3. Interview
    4. Mania
    5. None of these
Correct Option: C

In php division returns a float that is a non zero value thus evaluates to true.



Your comments will be displayed only after manual approval.