How do I add comments to my PHP script?
For single line comments, the most common method is the double slash, like this:
<?php
//this is a comment
?>
For multi-line comments you can either use the above method, but it's easier to do this:
/*
This is a comment that spans several lines
This brilliant code was written by me
Use comments throughout your scripts so you can remember what on earth they do when you come back to it six months later
Or if another programmer has to support your code, then give them a chance by filling it with copious comments, it's good practice
*/
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More other PHP Questions
Can I spellcheck my text using PHP?How do I check if a date entered exists?
What are autoglobals?
What is the difference between the while and do while loops?
Can PHP create PDF files for me?
