Reply to Re: [PHP] Floating numbers truncating to two digits without rounding

Your name:

Reply:


Posted by Ray Hauge on 01/10/06 00:27

On Monday 09 January 2006 03:20 pm, Mark Steudel wrote:
> I am calculating things like tax and want to format them so they only have
> 2 digits past the decimal point. I've been using sprintf but just noticed
> that it tends to round up. I want the same functionlity without rounding.
>
> Thanks

You could try number_format() though I haven't looked to see if it rounds up
or not.

--
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
http://www.americanstudentloan.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация