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

Home » PHP » PHP Variables » Question
  1. What will be the output of the following PHP code ?
    <?php
    $n1 = 14;
    $n2 = 31;
    $n3 = 11;
    echo "$n1 = $n1 + $n2 + $n3";
    ?>
    1. 14 = 14 + 31 + 11
    2. Error
    3. $n1 = $n1 + $n2 + $n3
    4. Nothing
    5. None of these
Correct Option: A

Again since the variables are inside double quotes we get this result.



Your comments will be displayed only after manual approval.