Jump to content


Photo

Extending integers to 2 decimal places (displaying total price)


  • Please log in to reply
1 reply to this topic

#1 WebDeveloperMike

WebDeveloperMike

    New member

  • Member
  • 13 posts

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 Ben

Ben

    Administrator

  • Administrators
  • 5,660 posts
  • LocationGainesville, Florida

Posted 11 February 2012 - 02:47 PM

This may be helpful: http://php.net/manua...mber-format.php
  • 0
Benjamin Falk
Falken Creative : Twitter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users