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>

2 comments:

  1. Thanks so much for this great article; this is the kind of thing that keeps me going through the day. Ive been looking around for your article after I heard about them from a friend and was thrilled when I was able to find it after searching for some time. Being a avid blogger, Im happy to see others taking initiative and contributing to the community. I just wanted to comment to show my appreciation for your post as its very encouraging, and many writers do not get the credit they deserve. I am sure Ill be back and will send some of my friends. check this
    Gamesunblocked Unblockedgamesbeast unblockedgames77atschool

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...