[BNM] PHP/MySQL display 2 decimal points

Ian Barber gonz-bnm at raegunne.com
Mon Aug 14 10:00:02 BST 2006


delarge wrote:
> Egad! I have googled a lot for this... and now I approach my fellow
> BNM'ers
>
> My database has decimal field types... amounts go in as 4.00, 15.00,
> 5.50etc.
>
> prices diplayed on a page with a variable: $total = $price + $postage
>
> But when my PHP page prints out a value like £12.50 - I get £12.5

http://uk2.php.net/money_format is quite nice.

Ian




More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service