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

Home » PHP » PHP While Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n = "";
    while($n)
    {
    print "Manjesh";
    }
    print "Ojha";
    ?>
    1. Manjesh
    2. Ojha
    3. Error
    4. Nothing
    5. None of these
Correct Option: B

While accept does not accept anything other than a 0 or any other number as false and true.



Your comments will be displayed only after manual approval.