Learn PHP Tutorial

PHP Syntax

PHP Syntax starts with <?php and end with ?>


A PHP file can contains HTML tags and some PHP codes. PHP scripts get executed on the server and its result is shown on the browser.

To display the output on the screen in PHP, you have to use a built-in function named “echo” to produce output.

For example –

<!DOCTYPE html>
<title>PHP Syntax</title>
echo "Welcome to Share Query";