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
What are autoglobals?What does the @ character do in PHP?
Can I spellcheck my text using PHP?
how can i put the value 1 or 0 into checkbox if we checked then 1 otherwise 0?
I have lots of if else logic - is there another option?
