PHP syntax is the set of rules which need to be followed to to write properly structured PHP code.
Given below Some rules of PHP syntax
<html> <body> <?php echo "Hello World"; ?> </body> </html>
OR, This will also display the same output as above :
<?php echo "Hello World"; ?>
<html> <head> <title>My First PHP Page</title> </head> <body> <?php echo "Hello World!"; echo "Hello World!"; ?> </body> </html>
<html> <body> <?php //This is a comment /* This is a comment block */ ?> </body> </html>