CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Dollar format and keeping cents

Print topic Send  topic

Author Message
Rick B
Posted: 01/25/2002, 4:20 PM

I have seen a few things in here about formatting the amounts to $30.00 in the bookstore example. But the suggestions don't seem to work for PHP. Does anybody have tested way to produce the dollar amounts in this format $30.00 instead of 30 ?
Nicole
Posted: 01/26/2002, 1:56 AM

Rick,
you should use PHP function number_format(). E.g. of code for BeforeShow event:
$fldprice = "$". number_format($fldprice, 2);
Rick B
Posted: 01/26/2002, 3:27 PM

Thank you very much, that worked great!

Rick

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.