Introduction to PHP – Beginners Guide for Easy Learning

What is PHP?

Originally it was known as Personal Home Page, later it was changed to Hypertext Preprocessor.

  • PHP is a server side scripting language.
  • It is used to create dynamic and interactive websites.
  • It is also used in making web based software applications.

Why use PHP?

  • It is easy to use.
  • It is a cross – platform language i.e. Platform independent ( which can be programmed on one platform, “for ex : Windows” and can be operated on another, “for ex : Linux”)
  • It is free to use scripting language.
  • It is based on OOPs, which makes it popular among developers.

Websites made using PHP

Below listed some websites which has been made using PHP

  • Facebook
  • Yahoo
  • WordPress
  • Flickr

Setting up PHP in a system.

To setup PHP in a system we need three things: PHP, Database Software and a Server Software, after that we need to configure them.

Instead of installing these three individually a third party software can be installed which will contain all three mentioned above and these all will be pre-configured.

Examples of these software are: WAMP (Windows, Apache, MySQL and PHP) and XAMPP. Between the two given above, WAMP is only for windows as it contains windows in its name.

Syntax and a simple program in PHP

By default PHP can be written inside tags “<? php” and  “?>”, which can be changed by changing server configuration.

Syntax:

<?php
 code....
 ........
 ........
?>

Program:

<html>
<head>
<title>A simple program in PHP </title>
</head>
     <body>
        <?php
              echo   “Hello world”; // Echo is used to print
        ?>
      <body>
</html>

OUTPUT

We have a comprehensive series of articles for learning Website Development. Visit How to Web category articles for up-to-date articles. We will be adding other tutorials in PHP series. Stay tuned and do not forget to provide your valuable feedback and comments.

Top