Introduction to PHP With EM

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.

  • PHP stands for Hypertext Preprocessor.
  • PHP is free and open source.
  • It is a server-side scripting language.
  • PHP scripts are executed on the server.
  • PHP supports many databases (MySQL, Sybase, Oracle, Microsoft SQL and others).
  • PHP runs on multiple platforms (Unix, Linux, Windows and Mac).
  • PHP is compatible with the majority of web servers currently in use (Apache, IIS and so on).
  • A PHP file can contain plain text, HTML tags and scripts.
  • The PHP files can have one of the following extensions PHP, php3 or phtml.

The uses of PHP

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

  • It reduces the time to create giant dynamic websites.
  • Through PHP you can restrict the user to access some pages of your website.
  • Through PHP we can add, delete and modify things on our website.
  • PHP can handle forms data.
  • We can make an E-commerce website using PHP.
  • Create a customized user experience for visitors based upon the information you gathered from them.
  • It has a large developer community and plenty of scripts.
  • Used in large CMSs like WordPress, Joomla and so on.

Why PHP

PHP is famous due to the following properties:

  • Open source.
  • Simplicity.
  • Efficiency.
  • Security.
  • Flexibility.
  • Familiarity.
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.
  • HTML and CSS.
  • JavaScript.
  • Web Server (for example wamp, xamp and so on).
  • Any editor (Dreamwear, Notepad++ and so on).
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


Similar Articles