Welcome to WebmasterWorld Guest from 54.198.132.40

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)

Junior Member

10+ Year Member

joined:Jan 7, 2004
posts:90
votes: 0


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)

Junior Member

5+ Year Member

joined:Dec 7, 2008
posts: 77
votes: 0


Here Is the Solution...

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

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

Senior Member

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

joined:Nov 28, 2004
posts:7999
votes: 0


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