clock  Mon - Sun 8.00 AM - 8.00 PM
mail  edu@teknowize.com
fb
instagram
play store
pinterest

More

PHP comments

Imperial Advance Hero Image

PHP comments

PHP Comments

A comment is a line that is not executed in output. It is only used to read by the developer for an idea about the code .

 

PHP supports three ways of commenting:

  • We can use ‘//’ for commenting in PHP.
  • We can also use ‘#’ for commenting in PHP.
  • We can also use ‘/* ... */’ for commenting in PHP.

 

Syntax - 

<?php
//echo " This line is commented"
#echo " This line is commented "
/* echo " This line is commented " */
?>

 

For example 

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Document</title>
</head>
<body>

<h4>hello all of you</h4>

<?php
//echo " welcome to teknowize"
#echo "my name is sumit"
print "i use two different method of commenting in PHP."
?>

</body>

</html>

 

Outputphp Comments

PHP