Jump to content

Formatting numbers to show commas and decimal points.


frank_solo

Recommended Posts

Good afternoon,

 

Try this code:

 

$number = 1234.56;

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

print($english_format_number);
 

 

Read this page here: http://php.net/manual/en/function.number-format.php

 

Kind regards,

 

L2c.

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.