Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code ?
    <?php
    function calculate($n1, $n2)
    {
    $n3 = $n1 * $n2;
    return $n3;
    }
    $R = calculate(22, 23);
    echo $R;
    ?>
    1. 22
    2. 23
    3. Error
    4. 506
    5. None of these
Correct Option: D

Function returns $n3.



Your comments will be displayed only after manual approval.