Saturday, April 1, 2017

Function In PHP


<?php

function Add($num1, $num2){
  $result = $num1 + $num2;
  return $result;
}

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

$sum = Add(Add(10, 10), Divide(14, 2));
echo $sum;

?>

No comments:

Post a Comment