PHP Programing language

adplus-dvertising
Which type Operate for Function with two Parameter
Previous Home Next
<html>
<head>
<title>Function with two parameters</title>
</head>
<body>
<?
function addNums( $a1, $a2 ) {
    $re = $a1 + $a2;
    $ret = "<table border=\"1\">";
    $ret .= "<tr><td>number 1: </td><td>$num1 </td></tr>";
    $ret .= "<tr><td>number 2: </td><td>$num2 </td></tr>";
    $ret .= "<tr><td>result: </td><td>$result</td></tr>";
    $ret .= "</table>";
    return $ret;
}

print addNums (100, 200);
?>
  
</body>
</html>

Output:

Previous Home Next