When the name comes the PHP, the first thing comes is the ease of coding. Now as the developers know, code is executed at server side and the result which is sent to the browse is in plain HTML format.
Considering this tutorial to guide PHP developers who are beginners, here is the first step towards start coding in PHP.
Syntax:
Within ?php and ? Developers need to add server side scripting. This version of syntax is more commonly compatible. One of the comparatively less compatible version of syntax is to write script within . This version excludes writing php from the syntax. Also this syntax is compatible where shorthand support is enabled. But it is recommended to use the first universally compatible syntax so that integrity of code is maintained across the web.
A php file not only contain solely scripting language but also includes HTML tags as well.
Each code line in php ends with semicolon, as you might have observed in C and C++. This semicolon is known as distinguisher as it differentiates sets of instructions in overall code. There are two statements are supported by php to output the text. One is echo and second is print. One thing to be considered is that the file must have .php extension and not the .html.
Comments in PHP
The commenting in PHP is very much the same as in C – C++.
In PHP, Developers use // to make a single-line comment or /* and */ to make a large comment block.
The upcoming part of this on going tutorial will include the tutorial for variables in php and the scope of this variable within the code scope.
Software QA Company - Description: Custom programming company EffectiveSoft offers wide range of software development services with the usage of PHP, Java or .NET technologies.
Software QA Company - Description: Custom programming company EffectiveSoft offers wide range of software development services with the usage of PHP, Java or .NET technologies.