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

Home » PHP » PHP Operators » Question
  1. What will be the output of the following PHP code ?
    <?php
    $str = 'view ';
    print "Inter{$str}Mania";
    ?>
    1. Error
    2. Interview
    3. Mania
    4. Interview Mania
    5. None of these
Correct Option: D

{$}dereferences the variable within.



Your comments will be displayed only after manual approval.