026 - function with parameters
Hello this is the name of the progarmmer =Rajat singh
this is for two parameters first is =rajat and second is =singh
this is for two parameters first is =meerut and second is =city
30.5
30.5
<?php // 026 - function with parameters echo "</br><span class='myheading'> 026 - function with parameters </span></br>"; function hello_a_026($name){ // function echo "Hello this is the name of the progarmmer =" . $name. "<br>"; } hello_a_026("Rajat singh"); // function calling /* TWO Argument : */ function hello_b_026($fname,$lname){ echo "this is for two parameters first is =". $fname." and second is =" . $lname."<br>"; } hello_b_026("rajat","singh"); hello_b_026("meerut","city"); /* Default Value : */ function hello_c_026($fname="First",$lname="Name"){ echo "Hello $fname $lname.<br>"; } /* SUM function */ function sum_026($a,$b){ echo $a + $b; echo "</br>"; } sum_026(10,20.50); /* Passing with Variables */ $one_026 = 10; $two_026 = 20.50; sum_026($one_026,$two_026); ?>