Thursday, August 14, 2014

Function With Return Value In php

<?phpfunction add($num1, $num2){
$result = $num1 + $num2;
return $result;
}

function  divide($num1, $num2){
$result = $num1/$num2;
return $result;
}

echo $sum = add(100,100) - divide(50,2);

?>

No comments:

Post a Comment