Home » PHP » PHP Variables » Question
  1. What will be the output of the following PHP code ?
    <?php
    $p = 11;
    $q = 3;
    echo $p % $q;
    ?>
    1. Nothing
    2. $p % $q
    3. 2
    4. Error
    5. None of these
Correct Option: C

% is the modulo operator. Unlike in C we can use it get reminder or floating point numbers in PHP.



Your comments will be displayed only after manual approval.