Hey guys today I will provide you the basic introduction of PHP the most famous language used in web development nowadays. Let's start.

What PHP is

PHP is the most powerful word in web development for the last several years. We tend to all understand that PHP, also known as Hypertext Preprocessor, is a commonly used scripting language for a most eye-catching website.

The PHP programming language is a server-side HTML embedded scripting language. The PHP language runs on the server side. This implies that the scripts are executed on the server where the web site is hosted. HTML embedded means that you can use PHP statements from within an HTML code. PHP files are returned to the browser as plain HTML.

Here are some key points.

The uses of PHP

The following are some of the basic uses of the PHP language:

Why PHP

PHP is famous due to the following properties:

Working of PHP with Diagram

working of php with diagram

What we should know before using it

These are the requirements before learning the PHP. Example Script

We will start with a simple PHP script. Let's do an example.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>My first PHP Script with EM</title>
  6. </head>
  7. <body>
  8. <?php
  9. echo 'My first PHP Script with EM'; //this is use for print
  10. ?>
  11. </body>
  12. </html>
The following is the output:

PHP Script with EM