<html>
<head>
<title> Nesting Function</title>
</head>
<body>
<?php
function myFunction($p,$t)
{
function convert_pound($d, $c=1.9)
{
return $d * $c;
}
$total = $p + ($p * $t);
echo "Total cost in d: $total. Cost in
British pounds: " . convert_pound($total);
}
myFunction(18.00,.090);
echo convert_pound(18);
?>
</body>
</html>
Output:
Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R