Welcome to WebmasterWorld Guest from 54.146.59.202

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

problem setting prices in 2 digits

problem setting prices in 2 digits

     
3:28 am on Oct 31, 2011 (gmt 0)

10+ Year Member



I need help. I am work on the prices lists
$22.00 but the
Incorrect price $22.000 display. Help what is a code to set up
9:26 am on Oct 31, 2011 (gmt 0)

5+ Year Member



Here Is the Solution...

number_format($number, 2, '.', '');

Thanks
Mahabub
5:13 pm on Nov 1, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



echo sprintf("%.2f",$number);
 

Featured Threads

Hot Threads This Week

Hot Threads This Month