PHP Programing language

How Can Using Nesting Function
Previous Home Next
<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:

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: