PHP Examples - Echo - PHP Program

Program:
<html >
<head>

<title>PHP Example 2</title>
</head>

<body>
<?php
 
 echo "PHP Example 2";
 echo"<br/>"; // line break
 echo"<h1>";
 echo"ECHO";
 echo"</h1>";
 echo"<br/><li>";
 echo"Displays the text or values of a variables.";
 echo"</li><br/><li>"; // line break & list item
 
 $x="HELLO PHP..."; //Variable x
 echo $x;
 echo"</li><br/><li>"; 
 
 $y= 2;
 echo 'PHP Example:'.$y; 
 echo"</li><br/><li>"; 
 
 echo'PHP'; //single quotes
 echo"</li><br/><li>";
 
 echo"'PHP'"; //to display string in single quotes
 echo"</li><br/><li>";
 
 echo"\"PHP\""; //to display string in double quotes
 echo"</li>";

 echo "<br/><b>";
 echo"WWW.2K8618.BLOGSPOT.COM";
 echo"</b>";
?>


</body>
</html>
Output:





2 comments:

Related Posts Plugin for WordPress, Blogger...