Mar 1, 2001, 9:44 AM
Veteran (19537 posts)
Mar 1, 2001, 9:44 AM
Post #2 of 7
Views: 4260
Are you sure that is the correct part.......
When you find the bit that prints the number add this....
printf("%.2f", $variablethatprintsnumber)
That will limit it to 2 decimal places.
Paul Wilson.
Installations:
http://www.wiredon.net/gt/
When you find the bit that prints the number add this....
printf("%.2f", $variablethatprintsnumber)
That will limit it to 2 decimal places.
Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Mar 2, 2001, 9:02 PM
Veteran (1936 posts)
Mar 2, 2001, 9:02 PM
Post #4 of 7
Views: 4235
Change
To
Happy Coding,
--Drew
http://www.FindingHim.com
Code:
$FORM{$name} = $value; }Code:
$FORM{$name} = sprintf("%.2f", $value); }--Drew
http://www.FindingHim.com
Mar 4, 2001, 10:50 AM
Veteran (1936 posts)
Mar 4, 2001, 10:50 AM
Post #6 of 7
Views: 4203
printf and sprintf do the same thing, just at different points in time. Printf does the rounding at the point of printing; sprintf saves the result of rounding for future use...
BUT what I think you mean is that that change didn't format anything at all. Search through you script some more or post a .txt copy somewhere so we can look at it and find the right codes...
Happy Coding,
--Drew
http://www.FindingHim.com
BUT what I think you mean is that that change didn't format anything at all. Search through you script some more or post a .txt copy somewhere so we can look at it and find the right codes...
Happy Coding,
--Drew
http://www.FindingHim.com