What is PHP?


PHP is an acronym for Hypertext Preprocessor.PHP is open source server side scripting language. It's especially suited for web development. It was Designed by Rasmus Lerdorf. PHP is an interpreted language. PHP is faster than other Scripting languages.A PHP script can be placed anywhere in the document.The file extension for PHP is '.php'.

Example 1 : index.php
<html>
  <head>
    <title>PHP</title>
  </head>
  <body>
    <h1><?php echo "Hello World"; ?></h1>
  </body>
</html>
PHP with CSS and HTML

CSS is a style sheet language used for style the presentation of document written in markup language. we can use styles in PHP.

Example 2:
<html>
  <head>
    <title>PHP</title>
  </head>
  <body>
    <?php
	  $a=10;
          $b=20;
	  $c=$a+$b;
	  echo "<h1 style='color:green;'>Total : {$c}</h1>"; 
	?>
  </body>
</html>