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

Home » PHP » PHP Operators » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n = 10;
    $m = 10;
    if ($n && ($m = $n + 10)) {
    echo "True";
    }
    echo $m;
    ?>
    1. 20
    2. 10
    3. True
    4. True20
    5. None of these
Correct Option: D

In if condition when the first case is 10 and is an && operation then the second command is executed.



Your comments will be displayed only after manual approval.