Re: Re: [PHP] Round with money_format

2011-09-19 Thread Cyril Lopez
2011/9/17 Bill Guion : > On Sep 17, 2011, at 3:46 AM, Cyril Lopez wrote: > >> From: Cyril Lopez >> Date: September 16, 2011 10:58:28 AM EDT >> To: php-general@lists.php.net >> Subject: Round with money_format >> >> Hi, >> >> Can someone help me understand how money_format() rounds numbers ? >> >>

Re: Re: [PHP] Round with money_format

2011-09-17 Thread Richard Quadling
On 17 September 2011 15:56, Bill Guion wrote: > On Sep 17, 2011, at 3:46 AM, Cyril Lopez wrote: > >> From: Cyril Lopez >> Date: September 16, 2011 10:58:28 AM EDT >> To: php-general@lists.php.net >> Subject: Round with money_format >> >> Hi, >> >> Can someone help me understand how money_format()

Re: [PHP] Round with money_format

2011-09-17 Thread Tedd Sperling
On Sep 17, 2011, at 10:56 AM, Bill Guion wrote: > On Sep 17, 2011, at 3:46 AM, Cyril Lopez wrote: >> >> Can someone help me understand how money_format() rounds numbers ? >> > As someone else pointed out, rounding rules vary by locale, but I was taught > 40+ years ago in graduate school programm

Re: Re: [PHP] Round with money_format

2011-09-17 Thread Bill Guion
On Sep 17, 2011, at 3:46 AM, Cyril Lopez wrote: > From: Cyril Lopez > Date: September 16, 2011 10:58:28 AM EDT > To: php-general@lists.php.net > Subject: Round with money_format > > Hi, > > Can someone help me understand how money_format() rounds numbers ? > > setlocale(LC_ALL, 'fr_FR.UTF-8')

Re: [PHP] Round with money_format

2011-09-16 Thread Stuart Dallas
Oops... On 16 Sep 2011, at 16:36, Stuart Dallas wrote: > On 16 Sep 2011, at 15:58, Cyril Lopez wrote: > >> Can someone help me understand how money_format() rounds numbers ? >> >> > setlocale(LC_ALL, 'fr_FR.UTF-8'); >> $price = 12.665; >> echo money_format('%i',$price); >> // 12.66 EUR, 12.67 E

Re: [PHP] Round with money_format

2011-09-16 Thread Stuart Dallas
On 16 Sep 2011, at 15:58, Cyril Lopez wrote: > Can someone help me understand how money_format() rounds numbers ? > > setlocale(LC_ALL, 'fr_FR.UTF-8'); > $price = 12.665; > echo money_format('%i',$price); > // 12.66 EUR, 12.67 EUR expected > > $price2 = 12.666; > echo money_format('%i',$p

Re: [PHP] Round with money_format

2011-09-16 Thread Richard Quadling
On 16 September 2011 15:58, Cyril Lopez wrote: > Hi, > > Can someone help me understand how money_format() rounds numbers ? > >  setlocale(LC_ALL, 'fr_FR.UTF-8'); >  $price = 12.665; >  echo money_format('%i',$price); >  // 12.66 EUR, 12.67 EUR expected > >  $price2 = 12.666; >  echo money_format