August 17, 2024
PHP Comment
If you want to write some notes in your PHP code file which you do not want to show on the webpage but want to include in your PHP code file for better understanding your code. So for it you can create comments in PHP. These comments present in your file but, these all will be ignored by the browser. There are two types of comments in PHP, single line comment and multi line comment. You can start single line PHP comments with // sign and you can write your text following that. And multi line PHP comment starts with /* and ends with */. Examples of PHP comments are mentioned below:
Single Line Comment
<?php
// comment sample
?>
Multi line Comment
<?php
/*
comment sample line 1
comment sample line 2
*/
?>