What is PHP?

Php stands for pre hypertext programming language or hypertext preprocessor. It is a server site programming language like other programming language like Asp.net etc.

Now a day it is very much popular in website development. Many big websites like yahoo, Facebook and many other social networking sites are generally made in php .

Php files have a file extension .php, .php3 , .phtml etc.

Features of PHP

There are many features of php:

  • It is server site programming language.
  • Php is an open source language and it can be free download and use .
  • It is a loosely type language there is no need to declare the type of variable in php.

Database in PHP

Php support many databases like MySQL, Informix, Oracel, ODBC etc. Rather than it is also having its database i.e. phpMyAdmin.

Basic Body Architecture of PHP




The whole programmed in php is written in between .

Evolution of PHP

Php was developed by Ramus Lerdrof in 1994. After that it was modified by Zeev Suraski and Andi Gutmans in 1997.

After installation php in your computer you can test your browser by typing:

http://localhost and then press enter

Variables in PHP

Variables are used to store information or a value to its. Like other programming language php have its own variable .but in php there is no need to define its data type it will be automatically regret its vale that it is of integer or character type.

In php variable define with a sigh of ‘$’ i.e.

$a, $abc etc.

The first character after $ must be character or underscore. The remaining character in name may be letter , number or underscore.

Syntax :

$variable_name = value;





$c= $a+$b;

First programme in PHP

Echo “Hello”;


echo: eco is used for output a string and must be ended with a semicolon. The string must be written in between doubleqoutes.

We can also use print as in place of echo.


Print “Hello My Name is Pankaj Singh”;


Output: Hello My Name is Pankaj Singh


$abc=” Hello My Name is Pankaj Singh”;

Echo $abc;

Print $abc;


Output of above program is:

Hello My Name is Pankaj Singh Hello My Name is Pankaj Singh


Comment in PHP

There are generally two types of comments used in php

  • Single line comments : //
  • Multiline comment: /*….*/


// this is a single line comment


/* This

Is a

Multiline comment





Like it on Facebook, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet

Is our army's deaths are in vain as Indian goverment is not taking any strict action against pakistan ?

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum 0 answer(s) and maximum 2 answer(s).
[{"id":"23034","title":"Yes","votes":"22","type":"x","order":"1","pct":64.71,"resources":[]},{"id":"23044","title":"No","votes":"12","type":"x","order":"2","pct":35.29,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
No married couple wants to end up getting divorced. It is not like they have planned for it. They try to put up with their partners for as long as they
Due to our modern lifestyle, we feel that digestion related disorders are a common problem. Thus, we neither give importance to them nor seek any help
The bond of marriage brings the two people together. Initially, everything may seem okay and both of them slowly start discovering each other in the journey.
Methi Poriyal   Methi or Fenugreek is a small bitter brown seed that is  very nutritious and a healthy way to lowering blood sugar in diabetics.
Sweet Potato Balls / Chilakada Dumpa Purnalu Ingredients: Smashed Sweet Potato – 2 Cups Black Gram - 3 Cups Rice – 8 Cups Grated Jaggery -1 ½
History of cooking and baking Cooking is an art that needs dedication and more than anything interest .Over the centuries human beings have perfected
Fruits add a good nutrition to our body. Fruits are very good for the health. It can be included in our diet. It is said that fruits are rich in protein
Often while hearing the kebab it comes to our mind that kebab is especially made with lamb. Most of the people do not eat lamb in fact I also do not eat