PHP Examples - Function


PHP Example - Function

Program:
<html >
<head>

<title>PHP Example 6 : FUNCTIONS</title>
</head>

<body>
<?php
 
 echo "<br/>PHP Example 6";
 echo"<br/>"; // line break
 echo"<h1>";
 echo"FUNCTIONS";
 echo"</h1>";
 echo"<br/>";
 
 function add($a,$b) //function for the addition
 {
  return $a+$b;
 }
 $x=20;
 $y=30;
 $z=add($x,$y);
 echo "<br/>Adding $x & $y   $z";
 
 echo "<br>Adding 10 & 20  ".add(10,20);
 
 echo "<br/><br/><br/><br/><b>";
 echo"WWW.2K8618.BLOGSPOT.COM";
 echo"</b>";

?>


</body>
</html>

1 comment:

Related Posts Plugin for WordPress, Blogger...