PHP is forgiving
: Certain syntactical features like function prototypes and variable declarations are not needed in PHP. It stresses accommodation for the developer over accuracy.It has least set of syntactical principles that the code must take after.If any parse errors are found in the browser window, then it means PHP rules are not followed.HTML is not PHP
: HTML is a static library but PHP is a dynamic language.They can interact with each other but they are not the same.PHP syntax is relevant only with PHP since PHP is implanted in HTML components.All aspects of a report is interpreted as either PHP or HTML,depending on the labels.PHP syntax looks like C-language
: Loops,control structures also exist in PHP.PHP is case sensitive
: Once a variable declared in a case,it cannot be changed.Statements are terminated with semicolons.Syntax
:
[php]
<?php write your php code here ?>
[/php]
Before using these tags,configuration has to be done in the editor.The php script with this tags start with <? and end with ?>.
Syntax
:
[php]
<?Write your code here?>[/php]
These tags are normally used by Server Pages that are active to delineate code blocks. The php script with this tags start with <% and end with %>.
Syntax
:
[php]
<%Write your code here%>[/php]
The script tags of HTML can be used to define PHP.The php script with this tags start with <script> and end with </script>.
Single Line comments
:
// is one type single line comment
# other type single line commentMultiple lines comments
/* this is multi
Line comment */