Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Daniel Brown
On Wed, Dec 31, 2008 at 11:15, LKSunny wrote: > i need accuracy, how to ? No you don't. Not the level of accuracy Per was mentioning. His suggestion to round() is what you need. Just adjust the [optional] second parameter to the number of decimal places you wish to round: \n"; } ?> > "P

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread ceo
If it's money, store everything in pennies INTEGER, and format as dollars on output. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Micah Gersten
http://us3.php.net/manual/en/function.number-format.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com LKSunny wrote: > i need accuracy, how to ? > > Thank You. > > "Per Jessen" > ¼¶¼g©ó¶l¥ó·s»D:gjg4fk$58...@saturn.local.net... > LKSunny wrote: > > >> >

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread LKSunny
i need accuracy, how to ? Thank You. "Per Jessen" ¼¶¼g©ó¶l¥ó·s»D:gjg4fk$58...@saturn.local.net... LKSunny wrote: > $credithold = 100; > for($i=1;$i<=1000;$i++){ > $credithold -= 0.1; > echo "$credithold"; > } > //i don't know why, when run this code, on 91.3 after expect is 91.2, > however

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Per Jessen
LKSunny wrote: > $credithold = 100; > for($i=1;$i<=1000;$i++){ > $credithold -= 0.1; > echo "$credithold"; > } > //i don't know why, when run this code, on 91.3  after expect is 91.2, > however..91.2001 > //who can help me ? and tell me why ? It's a floating point rounding error. If

[PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread LKSunny
"; } //i don't know why, when run this code, on 91.3 after expect is 91.2, however..91.2001 //who can help me ? and tell me why ? //Thank You. ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php