|
Posted by iulian.ilea on 09/21/06 07:18
I have this functions, c3 and c2 that computes and return a float
number. The problem is that wen I pass the result of c2 (float number)
to c3(), in function apears to be an integer. Ex.:
$calc2=c2(params); (float number)
$calc3=c3($calc2); ($calc2 - float number)
echo $calc3; (is not the number that supposed to be, because c4
computes $calc2 as if it were an integer: if $calc=39.96 it wil be
converted in 39).
What is the problem? I really can't see it.
_____
function c2($j,$n)
{
//=(J54*100)/N47
$c=$j*100/$n;
return number_format($c,2,",",".");
}
function c3($calc)
{
//=((16*M54)/100)+4
$c=((16*$calc)/100)+4;
return number_format($calc,2,",",".");
}
______
Navigation:
[Reply to this message]
|