PHP Comments and its use inside code
Output is here
Multiple Line commentsTo comment more than one line or a block of code we can write like this
Output is here
In this type of code we must write a stop comment also like */ along with start comment like /*
Comments are used in php to not to execute a part or a line of code. Use of comments is a good practice and it helps in code maintenance for future modification and updating. By using comments we can comment or stop executing on a part of a line or in a block of code. You can read the HTML comments also. Here basic difference between html comment and php comment is in case of php comments; server never sends them to browser, where as all html comments are posted to browser but browser stops displaying them. Any one can see html comments by checking the view – source of the page. The comments are inserted in any part of the PHP code. // Single line comment # Single Line comment /* ---- */ Multi line comment | ||||||||
| ||||||||