Syntax

« « Introduction| Data Types » »

PHP’s syntax are similar to most of the other programming languages (C, Java, Perl) with the addition that all PHP code is contained within a tag. PHP code can be easily embed into your HTML code.

Four different ways to escaping to PHP:

Note:- You can set  the escaping option in your php.ini file.

Commenting in PHP Code:

PHP Statement termination:

Every statement in PHP must be  followed by a semicolon (;). Block of valid PHP statements that is enclosed by the PHP tags is a valid PHP program.

PHP Case sensitivity:

In PHP the user defined functions, classes, core language keywords (for example if, else, while, echo etc.) are case-insensitive. PHP variables are case-sensitive