a few things, maybe you overlooked it but your closing php delimter is backwords. the other thing, and what LordShryku was saying is, that you are calling the function with an echo function when you allready have an echo inside the function.
two things you could do;
rework the function to return the results instead of echo them from inside the function. eg:
<?php
function larger($x,$y)
{
if (!isset($x)||!isset($y)) {
return 'this function requires two numbers';
} else {
if ($x>=$y) {
return $x;
} else {
return $y;
}
}
}
?>
and call it using;
<?php
include("temp4.php");
$a = 1;
$b = 2.5;
$c = 1.9
echo larger($a, $b);
echo larger($c, $a);
echo larger($d, $a);
?>
or dont call it using the echo, eg:
<?php
include("temp4.php");
$a = 1;
$b = 2.5;
$c = 1.9
larger($a, $b);
larger($c, $a);
larger($d, $a);
?>