PHP Syntax

Before Learn about PHP. let us first learn about Syntax.

PHP code resides within its delimiters.
The most common delimiters are "<?php" and "?>"

<?php -- Starting Delimeter
?> -- Ending Delimeter

Syntax

<?php
      
?>
  <?
      
?>
or
 

Note: Commonly PHP File contains HTML tags, like HTML, BODY..

Here is the example for PHP & HTML code:

<html>
<head>
<title>First PHP Program</title>
</head>
<body>

<?php
echo "Good Morning!";
?>
</body>
</html>

Output: Good Morning!

Every Statement in PHP is Closed with Semicolon ( ; ) .