Welcome back to the tutorial 2, here we will start our programming in php. We will make different folders for different tutorials, so first make a Tutorial 2 folder in www directory. We will do our programming in notepad or for your use you may use different user friendly text editors like notepad ++. Php files have .php extension, index.php is the file which is automatically executed in a folder, so make a index.php in Tutorial 2 folder and type the below code in .
now lets code for a simple hello world program.
<title>Innovation Escalator Tutorial</title>
echo “Hello World”;
echo command is used for printing, and each and every statement is terminated by a use of a semicolon.
Use of variables, loop and if conditions in php:
if($i%2 == 0)
the above php code prints hello only when the value of variable i is even. In php we just use a $ sign before a variable moreover we don’t need to define the variable type its up to you what data type you want to store, its a kind of flexibility.
This is all about basic of php… wait for next. Till then if you have any queries you make post them.