How to write a comment in PHP
PHP comments are lines in the code that are ignored by the PHP interpreter. They are used to write notes or reminders for yourself or other developers. There are two types of PHP comments: single-line comments and multi-line comments.
// Single-Line Comment /* Multi-Line Comment */
Single-line comments are used to write a comment on a single line. They start with // and end at the end of the line.
// This is a single-line comment. $name = "John"; // This variable stores the name "John".
Multi-line comments are used to write a comment that spans multiple lines. They start with /* and end with */.
/* This is a multi-line comment. It spans multiple lines. Use it for longer notes or to comment out larger blocks of code. */
|Comment||String||The comment text to be added in the code.|
|Start Tag||// or /*|
|End Tag||End of line or */|
Written by: Michael from Beginnrtuts.com 23-05-2023 Written in: PHP tutorials