Re: money maths

From: Date: Mon, 12 Feb 2001 21:23:09 +0000
Subject: Re: money maths
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39266@lists.php.net to get a copy of this message
On Monday 12 February 2001 11:34, Michael Hall wrote: > this works fine except that 14.95 * 2 comes out as 29.9 not 29.90. In > other words, how to add a zero so that there are always two decimal > places. Any solution to this, including regex? I can't find anything look for number_format() and sprintf () -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Those who will not reason, are bigots, those who cannot, are fools, and those who dare not, are slaves. - George Gordon Noel Byron (1788-1824), [Lord Byron]

« previous php.general (#39266) next »