Learn PHP - PHP Syntax Overview

Learn PHP - Introduction
The PHP code is enclosed in special start and end processing instructions <?php and ?> that allow you to jump into and out of “PHP mode.” On servers with shorthand support enabled you can start a scripting block with <? and end with ?>. For maximum compatibility, it is recommended that you use the standard form (<?php) rather than the shorthand form. As there are many languages which contains similar syntax like xml.
Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another. The file must have a .php extension. If the file has a .html extension, the PHP code will not be executed.
comment is the portion of a program that exists only for the human reader and stripped out before displaying the programs result. There are two commenting formats in PHP:
Single-line comments: They are generally used for short explanations or notes relevant to the local code. Here are the examples of single line comments.
<?
# This is a comment, and
# This is the second line of the comment
// This is a comment too. Each style comments only
print “An example with single line comments”;
?>

We share most popular or viral licensed and open sourced kanda, video, graphics, ebook, audiobook or other entertaining materials for free of cost. Our purpose is not to interfere other's life but to entertain youth of this world. Major contents this site are not for moral lesson but just for fun.