How to add | Use comments in php code

Insert single line comments & multiple lines comment inside php coding file.

How to add | Use comments in php code

Comments are very useful part of programming languages because there are lots of lines of code written inside php scripting coding file and without comments finding their right description is very hard so comments help the developer to remember their code format by simply adding some lines above or after code. Comments are that type of code structure which cannot run, execute inside program.Web developer can easily implement comments using forward slash( / ) ,hash( # ) & forward slash + star( * ). So here is the complete step by step tutorial for How to add | Use comments in php code.

How to add | Use comments in php code.

Sample Code for demo-singleline.php file.

<?php

// This is single line of comment code using forward slash.
$one = 10;

# This is alos single line of comment using hash.
$two = 10;

/*
Code Line one
Code Line Two 
This is multiple line of comment example.
*/


?>