Loading...
start the course

Learn PHP

Codes and notes

Syntax
Back Next

A comment in PHP code is a line that is not executed as a part of the program. Its only purpose is to be read by someone who is looking at the code.

<?php // This is a single-line comment # This is also a single-line comment /* This is a multi-line comment */ ? >

Back Next

Code editor

        <!DOCTYPE html>
        <html>
        <body>

        <?php
        
        # This is also a single-line comment
        
        echo
         "Comments";
        ?>

        </body>
        </html>
    

Output