26 August 2018

What is PHP?


  • PHP stands for "PHP Hypertext Preprocessor" 
  • PHP is a widely-used general-purpose scripting open source scripting language.
  • PHP is especially used for web development and PHP can be embedded into HTML.
  • PHP scripts are executed on the web server.
  • A PHP script starts with start tag "<?php" and ends with end tag "?>" 
  • PHP files have extension ".php". Example of some php files can be index.php, about.php, home.php, contact.php
  • PHP is a powerful programming language which has been used to create Facebook, Wordpress, Yahoo etc websites.
  • Sample PHP Code:
  •  1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    <html>
        <head>
            <title>Example</title>
        </head>
        <body>
    
            <?php
                echo "Hello World!";
            ?>
    
        </body>
    </html> 
    

  • Output of the above PHP Code:
    Hello World!

Beginning PHP and MySQL: From Novice to Professional

No comments:

Post a Comment

Featured Post

How to Write PHP code and HTML code within a same file

A PHP file can have both PHP code and HTML code together. Any HTML code written outside of PHP <?php //php code here… ?> Code is ig...

Popular Posts