Articles → PHP → Comments In PHP

Comments In PHP






Software Requirement




  1. XAMPP is installed on your machine
  2. Any text editor like Notepad

Prerequisite Knowledge





Types Of Comments




  1. Single line comments
  2. Multiline comments

Single Line Comments




  1. Using hash (#)
  2. 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>



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, April 24, 2013

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250