"> What will be the output of the following PHP code ?<?phpprint_r

Home » PHP » PHP Syntax » Question
  1. What will be the output of the following PHP code ?
    <?php
    print_r "Hello Interview Mania"
    ?>
    1. Hello Interview Mania
    2. Missing semicolon error
    3. Error
    4. Nothing
    5. None of these
Correct Option: C

The statement should be print("Hello Interview Mania") to print Hello world. Also if there is only one line then there is no requirement of a semicolon, but it is better to use it.



Your comments will be displayed only after manual approval.