PHP Comments
Comments are used by programmers while programming irrespective of the programming language. They make the computer program more understandable to the reader and are not interpreted or compiled while execution. PHP contains multiple ways of commenting.
Single-line commenting
Syntax of single-line commenting is:
<?php
//Single-line commenting
#Single-line commenting using hash symbol
?>
Multiple-line commenting
Syntax of multiple-line commenting is:
<?php
/*
This way of commenting
is used to comment
multiple lines of code.
*/
?>
EXAMPLE FOR PHP SCRIPT EMBEDDED WITH HTML
Note*: The PHP code written in the above program is processed by the server and plain HTML produced as output is sent to the browser for display.