For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > December 2004 > RE: [PHP-WIN] displaying neat and tidy currency notation?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-WIN] displaying neat and tidy currency notation?
Aaron Wagner

2004-12-03, 3:57 pm

http://us2.php.net/manual/en/function.number-format.php

use number_format function.

string number_format ( float number [, int decimals] ) string =
number_format ( float number, int decimals, string dec_point, string =
thousands_sep )

> -----Original Message-----
> From: George Pitcher [mailto:george.pitcher@ingenta.com]
> Sent: December 03, 2004 10:49
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] displaying neat and tidy currency notation?
>=20
>=20
> Hi,
>=20
> I want to be able to display the results of some calculations=20
> as currency
> such as =A325.50, but round($var,2) produces =A325.5.
>=20
> I've tried writing my own function but that just fouled up=20
> the calculation.
>=20
> Any tips or suggestions?
>=20
> Cheers
>=20
> George in Oxford
>=20
> --=20
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=20
>=20

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com