Comments are usually written within the block of PHP code to explain the functionality of the code. It will help you and others in the future to understand what you were trying to do with the PHP code. Comments are not displayed in the output, they are ignored by the PHP engine.
Single Line Comments
PHP single line comment begins with //, See the example below:
Use the Syntax
"// text"and"/* text */"Comments are usually written within the block of PHP code to explain the functionality of the code. It will help you and others in the future to understand what you were trying to do with the PHP code. Comments are not displayed in the output, they are ignored by the PHP engine.
Single Line Comments
PHP single line comment begins with
//, See the example below:Multi-line Comments
PHP multi-line line comment begins with
need an explanation for this answer? contact us directly to get an explanation for this answer/*, and ends with*/.