Killersites Community: Extending integers to 2 decimal places (displaying total price) - Killersites Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Extending integers to 2 decimal places (displaying total price)

#1 User is offline   WebDeveloperMike 

  • View blog
  • Group: Member
  • Posts: 13
  • Joined: 24-January 12

Posted 11 February 2012 - 01:53 PM

Hi everybody,

I would like to show a total dollar amount to customers with 2 decimal places, my php code is rendering things like this: $19.4 when I want it to show something like this: $19.40 - so basically just need to know how to extend it to 2 decimal places. Its probably pretty simple but i have been unsuccessful in my findings! Thanks!

Mike
0

#2 User is offline   Ben 

  • View blog
  • Group: Administrators
  • Posts: 5,409
  • Joined: 19-December 08
  • LocationChico, CA

Posted 11 February 2012 - 02:47 PM

This may be helpful: http://php.net/manua...mber-format.php
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users