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

Home » PHP » PHP If Else/Else If Statement » Question
  1. What will be the output of the following PHP code ?
    <?php
    $str = "Inter";
    if ($str.length)
    print $str.view;
    else
    print "Mania";
    ?>
    1. Inter
    2. view
    3. Mania
    4. Interview
    5. None of these
Correct Option: D

The . operator appends a string and returns true.



Your comments will be displayed only after manual approval.