When starting out with PHP, the obvious, and most important thing you’ll need to know is how to designate the area where the server’s PHP parser will start reading your code. As with most web page, PHP is used in conjunction with HTML. The HTML and PHP parser on your server translates these codes differently, so you need to show the PHP parser where to start, and end, reading your PHP code.

We do this simply by using something called PHP tags. If you have even the most basic HTML knowledge, you’ll know that you have to open and close your HTML with HTML tags. PHP is very similar.

The tags are the more basic part of the syntax. In order to end each line of PHP, you need to add a semi-colon (;). Although this is very simple, most new PHP coders fail to remember this when writing PHP. Please note that your PHP code will spit out all sorts of errors and not work if you ignore the semi-colon syntax.

<?php
// php statements can spread across multiple lines, 
// all statements should end with a semicolon
// your statement(s) must be enclosed in on the the acceptable php tags
?>

Remember, this is very important! All your PHP code MUST be between these tags, and you MUST add semi-colons at the end of each line of PHP code!