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>

3 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
  2. Thanks for the informative article. This is best resource I have found in quite some time. Nicely written and great info. I really thank you enough for sharing. keep posting like this...
    PHP Training Institutes
    Best Dot Net Training in Chennai
    Core Java Training in Chennai
    Best Software Testing Training Institute in Chennai

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...