PHP tutorials

PHP is a widely used open source general purpose server-side scripting language that is suited for web development. simply the php code can be embedded into html.

PHP created by the rasmus lerdorf in 1995.

php is the fourth most popular programming language in the word, it was running on more then 20 million web servers.

php is a programming language for building dynamic, interactive web sites. PHP programs run on a web server and serve Web Pages to visitors on request. One of the key features of php is that you can embed Php code within html web pages, making it very easy for you to create dynamic content quickly.

A dynamic web page is a page whose content can change automatically each time the page is viewed.

PHP can do :-

  • reading, writing, and creating files on the server.
  • php can be used to processing the contents of a web form sent by the visitor.
  • php support large volume of databases(mysql, oracle).
  • grabbing and processing data from other web sites and feeds.
  • using php image functionality you can create, open, manipulate and output images both to the browser and to disk.
  • using php you can read, write and manipulate xml documents.
  • php support object-oriented programming concepts.
  • php can handle errors robustly.

how to insert PHP code in html

<!doctype html>

      <title> how to insert php code in html file </title>
        <style  type= "text/css" >
       <body> <?php
                       function   iphone_price(){ echo ("$300") ; } 
                       function   ipad_price(){ echo ("$100") ; }
          <h1>  ecommerce website </h1>
             <h2>computer</h2> <h2>iphone</h2> <h2> ipad </h2>  
             <h2>like google </h2>
         <div>iphone price = <?php iphone_price(); ?>  </div>
         <div>ipad  price = <?php ipad_price(); ?>    </div>
         <div>google like = <?php echo "yes/no"  ?>  </div>
         <div> <?php echo ("<h1 style='color:#3c0'>thanks for order<h1>");?></div>