Author Topic: cegonsoft pvt ltd | Types of function in php | php tutorial  (Read 931 times)

0 Members and 2 Guests are viewing this topic.

Sharmait007

  • Guest
cegonsoft pvt ltd | Types of function in php | php tutorial
« on: September 15, 2011, 05:18:35 AM »
Types of functions in php:
Function with no arguments  and no return values.
Function with no arguments  and with return values.
Function with  arguments  and no return values.
Function with  arguments  and  return values.

Function with no arguments  and no return values.
<html>
<body>

<?php
function add()
{
$a=10;
$b=20;
Echo $a+$b;

}
add();
?>
Function with no arguments  and with return values.
<html>
<body>

<?php
function add()
{
$x=10;
$y=20;

$total=$x+$y;
return $total;
}
$a=add();
echo  $a;
?>
Function with  arguments  and no return values.
<html>
<body>

<?php
function add($x,$y)
{
$total=$x+$y;
echo $total;
}
add(10,10);
?>

Function with  arguments  and  return values.

<html>
<body>

<?php
function add($x,$y)
{
$total=$x+$y;
return $total;
}

echo . add(10,10);
?>


--------------------
Visit Us At:http://www.cegonsoft.com
cegonsoft


1,000 Leads Daily - 3 Day Risk Free Trial

Business Opportunity Leads!


 

P.S. Do you want to see how we made $14,178.00 Dollars Last Month?

Click Here For All The Info!

Free Advertising Forum Post Ads Online