What is PHP?

PHP is basically use for developing dynamic website. Some dynamic website are, etc. 

About Website

Website has two type

1- Static Website:-
In Static website, webpage alway show same page content.
we use html for create static webpage.

2- Dynamic Website:-
In Dynamic website, webpage content change automatically.
We use php with html for create dynamic page.
php work with mysql and change webpage content automatically.

we can also develope dynamic website in asp, and jsp

More about PHP

PHP is a server-side scripting language. because PHP Script store on server.
PHP is cross-platform, Means PHP scripts can run on many different operating systems.
PHP stands for Hypertext Preprocessor, we can also say Personal Home Page.
PHP syntax is match to C, C++, Java language syntax.
PHP developed in June 8,1995. PHP developed by Rasmus Lerdorf.

Advantage of PHP.

PHP is free software. For PHP Software,we can download xampp and wamp.
We can run PHP Script to many Operating system, like Windows,Linux,Unix etc.
We can run PHP Script to many server, like Apache server, IIS server etc.
We can use many database, like MySQL, Oracle etc.

How to Download PHP?

1.Go to
2.Search free download xampp or free download wamp.

For download xampp follow this link to download xampp.

For Download xampp

How to Install?

1. Double click on xampp and follows screen
2. After Successfully Install. Open xampp Control Panel (if you install xampp in c: then goto c:->xampp->xampp control panel).
3. Click on Apache and Mysql and also click on Start in front of Apache and Mysql then close xampp Control Panel.

First time PHP user then follows these steps. (Note:- For xampp)

1. Open any browser like Mozilla.
2. Type http://localhost
3. Click on English if you want to work on English version.
4. Go to C: if you install php in C:
5. Then create folder like www in C:->xampp->htdocs.

PHP Tags
1. 2. 3. 4. 5.

coding section

<script language="php">

coding section


coding section


coding section


coding section

This is correct php Block. Alway use this block This is another version. this is rare in use. This is php tag. but this tag is not work on every server This is sort tag. This tag is set enable to php.ini file. This tag is use for print data. This tag is equivalent to <?php echo ?>
How to Write PHP code?.

1.Go to Dreamweaver (you can use any editor but here we discuss through Dreamweaver)
2.Go to file->New->Dynamic page->PHP and Click on Create Button.

Then start to write php script.

Example 1:- Simple PHP Script

echo "Welcome";


How to Run PHP Programme?

1. Open any Browser like mozilla.
2. Type http://localhost/www on address bar. and Press Enter.
3. Click on php script file which you have saved like your file name is test.php. then click on test.php
you will see output.

Understand echo statement and print() function.

echo and print both has same work to give output like print string or variable data. But there are some difference.
Difference Between echo and print.
echo accept multiple argument, echo does not return anything. it is like a tag not really function.
print is function we can print one string or variable data by one php function. print function return integer value 1.

Example 2 :- To use of print() function



Example 3 :- PHP Script with HTML Tag.

echo "<b>welcome</b>";
echo "<br>";
echo "<i>User<i>";


Example 4 :- How to concatenate the strings

echo "<b>welcome</b>"."<br>"."<i>User<i>";