Link to home
Start Free TrialLog in
Avatar of aot2002
aot2002

asked on

using number_format function truncates the number

i have a number 99,999.00 in a session variable and i loop through the page and next time around i get 99.00

ive check several places and the last echo to screen
here is my issue
echo $total['shippingcharge']."<br>";
        $shippingcharge = number_format($total['shippingcharge'],2);
        echo number_format($total['shippingcharge'],2);
         

99,999.00
99.00


also try this
987,654,321.00
987.00
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial