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

Home » PHP » PHP Syntax » Question
  1. What will be the output of the following PHP code ?
    <?php
    $Name = "Rahul";
    $Name = "Ajit";
    echo "$Name";
    ?>
    1. Error
    2. Rahul
    3. Ajit
    4. Nothing
    5. None of these
Correct Option: C

The variable contains the last value which has been assigned.



Your comments will be displayed only after manual approval.