PHP 5 & 7 Basic Syntax, PHP syntax execute on the server and then return value to browser. PHP syntax start with <?php and end with ?>
Below, example test.php of a simple PHP file on a web page:
<?phpPHP source use default file extension with ".php". And PHP there are two basic ways to output like echo and print.
// PHP code goes here
?>
Below, example test.php of a simple PHP file on a web page:
<!DOCTYPE html>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>