> You need to use sprintf or printf to format the output. Here's the
> necessary code:
> $Percent = sprintf ("%0.2f", $Percent);
> If you use printf it will print the result, whereas sprintf
> (as used above) returns the string and lets you assign it to a variable
> instead.
> More info here:
You need to use sprintf or printf to format the output. Here's the
necessary code:
$Percent = sprintf ("%0.2f", $Percent);
If you use printf it will print the result, whereas sprintf (as used above)
returns the string and lets you assign it to a variable instead.
More info here: http://www.ph