- PHP code is executed on the server, and the plain HTML result is sent to the browser. A PHP scripting block can be placed anywhere in the document. It always starts with <?php and ends with ?>.
- The example of PHP code below sends the text “Conkurent LLC” to the browser:
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<html> <body> <?php echo " Conkurent LLC"; ?> </body> </html> To make a single-line comment, use //. To make a large comment block, use /* and */. See the example below: <html> <body> <?php //This is a comment /* This is a comment block */ ?> </body> </html>
-
- HTML summary
- PHP Arrays
- PHP If...Else Statements
- HTML references
