Thank you Nathan,
This worked quite well.
--Rick
On Jan 22, 2010, at 8:10 PM, Nathan Rixham wrote:
Rick Dwyer wrote:
On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
Thanks Nathan I'll give it a shot.
np - here's a more condensed version:
function round_to_half_cent( $value )
{
$
Rick Dwyer wrote:
> On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
> Thanks Nathan I'll give it a shot.
>
np - here's a more condensed version:
function round_to_half_cent( $value )
{
$value = ($value*100) + 0.3;
$out = number_format( floor($value)/100 , 2 );
return $o
On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote:
Thanks Nathan I'll give it a shot.
--Rick
your doing the number format before the rounding.. here's a version of
the function that should fit the bill:
function round_to_half_cent( $value )
{
$value *= 100;
if( $value ==
Rick Dwyer wrote:
>
> On Jan 22, 2010, at 4:24 PM, tedd wrote:
>
>>> Hello List.
>>>
>>> In an earlier post, I received help with a custom function to round
>>> decimals off (the custom function provided by Adam Richardson is below).
>>>
>>> However in my MySQL db, when I have values with only 1
On Jan 22, 2010, at 4:24 PM, tedd wrote:
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is
below).
However in my MySQL db, when I have values with only 1 decimal
point, I need the value PHP r
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is
below).
However in my MySQL db, when I have values with only 1 decimal
point, I need the value PHP returns to display as 2. For example,
3.8 need
Hello List.
In an earlier post, I received help with a custom function to round
decimals off (the custom function provided by Adam Richardson is below).
However in my MySQL db, when I have values with only 1 decimal point,
I need the value PHP returns to display as 2. For example, 3.8 need
7 matches
Mail list logo