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

Home » PHP » PHP Introduction » Question
  1. What will be the output of the following PHP code?
    <?php
    $str = "Interview";
    $str .= "Mania";
    echo "$str";
    ?>
    1. Interview
    2. Error
    3. Mania
    4. InterviewMania
    5. None of these
Correct Option: D

.= is a concatenation-assignment. $str equals its current value concatenated with “get”.



Your comments will be displayed only after manual approval.