Articles → PHP → Comments In PHP
Comments In PHP
What Are Comments?
- Single-line comments
- Multiline comments
Single Line Comments
- Using hash (#)
- Using double forward slash (//)
<html>
<head>
<title> Hello World in PHP </title>
</head>
<body>
<?php
// This is single line of comment
# Also single line of comment can be used in this way
?>
</body>
</html>
Multiline Comments
<html>
<head>
<title> Hello World in PHP </title>
</head>
<body>
<?php
/* This is multiline comment
and this can be extended to multiple lines */
?>
</body>
</html>