PHP Basic Syntax
![]() |
PHP Programming |
PHP Syntax can be place at anywhare in the document. PHP code must be placed between <?php /*your code here*/ ?>. A PHP file normally contains HTML tags, and PHP file extension is .php. This is example of PHP file.
This is fully PHP code with HTML tags.
PHP no keywords (echo, if, else, etc), classes, function (method) are not must have an uppercase, capitalized, and toggle case system because legal and still can be used. Example :
But for variable must same with variable's string that's created, because if not same with variable string that's created first although that's type is same but has different of the format of variable like uppercase, etc., the variable can't be used Example :
This example can't run because the variable of color has a three different variables.