As discussed previously, PHP scripts are surrounded by the PHP
<?php and the PHP end tag
?>. You’ll sometimes see the start tag
abbreviated to <?, but this conflicts with the XHTML standard and
should be avoided. Statements in a script are terminated with a
semicolon. Statements can be formatted for readability by
including any amount of whitespace—such as space characters, tab
characters,or blank lines—in a script.
Comments can be included in a PHP script using the following styles:
// One-line comment # Another one-line comment /* A multiple-line comment */
Anything that appears after the
or between the
*/ characters, is ignored.
Variables are prefixed with a dollar sign (
$) and variable names are case-sensitive. PHP has several variable ...