Syntax:
The PHP script must be saved with the file extension .PHP <?php // PHP Script here ?>
Comment in PHP code
A comment is a description that is placed for readers to make more clear. like other programming languages, PHP also has two types of comments.
- Single-line comment: used to put a comment for only single lines. A single-line comment in PHP script starts with either Hash(#) or Double forward-slash(//).
<?php // This is a comment. # This is also a comment. echo "Hello World!"; ?>
Example:
<?php /* This is a multiple line comment*/ echo "Hello World!"; ?>
0 Comments