Basic rules of PHP syntax
A PHP script can be placed anywhere in the document. A PHP script starts with <?php and ends with ?> :The default file extension for PHP files is ".php". A PHP file usually contains HTML tags and PHP script code. Below we have an example of a basic PHP file with a PHP script that uses a built-in PHP function "echo" to output the text "Hello World!" on web page: