1. Singleline Comments:
This means single line comment. We can implement these in 2 styles:
# and //
For example:
<html>
<body>
//Printing the message
print "sarala";
#output will be sarala
</body>
</html>
we can even implement singeline comments into multiline comments.
<?
//file: example.php
//author: WJ Gilmore
//date: 4rthmay2012
print " An example with comment";
?>
2. Multiline comments:
some times php provides more script and at that time we need to write multiline comments. So at that time we need to implement comment in C-style manner.
<?
/* Script multi_comment_example.php
purpose : Multiline comment example
author : sarala
date : 4may2012
*/
print "multiline comment can be found at the top of the script";
?>
This means single line comment. We can implement these in 2 styles:
# and //
For example:
<html>
<body>
//Printing the message
print "sarala";
#output will be sarala
</body>
</html>
we can even implement singeline comments into multiline comments.
<?
//file: example.php
//author: WJ Gilmore
//date: 4rthmay2012
print " An example with comment";
?>
2. Multiline comments:
some times php provides more script and at that time we need to write multiline comments. So at that time we need to implement comment in C-style manner.
<?
/* Script multi_comment_example.php
purpose : Multiline comment example
author : sarala
date : 4may2012
*/
print "multiline comment can be found at the top of the script";
?>
No comments:
Post a Comment