Let us begin with a very simple PHP program. 

Example:

hello.php
<?php
echo "Hello!!.";
?>
Output:Hello!!.


Example Using HTML and PHP
hello.php


<html> 
<head><title>My First PHP Page</title></head> 
<body> 
<span>
<?php 
   $name="Rajesh";
   echo "Hello $name";
?>
</span> 
</body> 
</html> 


Output:Hello Rajesh