PHP Introduction

PHP

PHP is a server side scripting language. It is used to develop Static websites or Dynamic websites or Web applications. PHP stands for Hypertext Preprocessor. 

PHP scripts can only be interpreted on a server that has PHP installed. 
A PHP file contains PHP tags and ends with the extensions .php

PHP is a widely-used open source programming language. It was created in the year 2004 by the collective efforts of many contributors. Some popular websites written in PHP are Facebook and WordPress.


Advantages of PHP 
  • It is fast. PHP is embedded in HTML code and its response time is short.
  • PHP is open source software and available free of cost.
  • Easy to use
  • It can run on many operating systems including Windows, Linux, Mac OS and Unix
  • It is available on almost all web hosts.
  • Technical support is widely available because large base of users provides free support through email discussion lists.
  • It is secure because user cannot see the PHP code.
  • It includes functionality designed to interact with specific database.
  • It is customisable. The open source license allows programmers to modify the PHP software according to their needs.
Writing PHP codes 

PHP Syntax

PHP scripts should start with

<?php

and ends with

?>

We can write PHP codes within these tags

e.g.

<?php

PHP codes;

?>

UNIT-304
Elementary Server Side Scripting through PHP
  1. PHP Introduction
  2. How to save PHP page
  3. PHP variables and their naming conventions
  4. PHP program to find maximum of 5 numbers
  5. PHP program to find minimum of 5 numbers
  6. PHP program to find sum of 2 numbers
  7. PHP program to find subtraction of 2 numbers