Click to See Complete Forum and Search --> : [RESOLVED] Maths help


LiL|aaron
03-09-2008, 11:22 AM
Hi i need some help with maths in money sense :)

Ok for an example:

Items 11 at £3.50 each

Total = £38.50

Now php outputs that as £38.5

Is there anyway to get the '0' added to the end?

Thanks
Aaron

Sorehead
03-09-2008, 11:31 AM
Total = number_format(Total,2)

http://www.w3schools.com/php/func_string_number_format.asp

A bit more information about the function at the link above.
Hope that helps

LiL|aaron
03-09-2008, 12:09 PM
Thanks mate, sorted that problem out !

Aaron