PHP Function call - Just running the code within it
############################
PHP Code
############################
Program 01: Normal Function just running the code within it<?php
// Normal Function just running the code within it
// function definition
function callme($a,$b)
{
// echo "<br/>Sum of the ".$a." and ".$b. "is = ".$a+$b;
echo "<br/>Sum of the ".$a." and ".$b. "is = ".($a+$b);
echo "<br/>Multi of the ".$a." and ".$b. "is = ".$a*$b;
echo "<br/>Min of the ".$a." and ".$b. "is = ".$a-$b;
echo "<br/>Divide of the ".$a." and ".$b. "is = ".$a/$b;
echo "<br/>Modulus of the ".$a." and ".$b. "is = ".$a%$b;
}
// function defination
// function call
callme(2,5);
// function call
?>
############################
Output of the Code
############################
Program 01:Sum of the 2 and 5is = 7
Multi of the 2 and 5is = 10-5
Divide of the 2 and 5is = 0.4
Modulus of the 2 and 5is = 2
Comments
Post a Comment