Jump to content

Mysql Float variables - 2 decimal places


gerkintrigg

Recommended Posts

Hi. this is probably a very simple question, with a very simple answer, but it's baffling me...

Does anyone here know how to echo a MySQL float variable as two decimal places? Currently I'm using it to store prices in a database and whenever a cost if like £1.50p it only displays £1.5 which simply looks wrong.

Can anyone help please?

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/16538-mysql-float-variables-2-decimal-places/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.