Jump to content

How to add comma in numbers -SOLVED


jester626

Recommended Posts

Your right you know! Wasn't looking, here's two way's:

$n = 12345.67890;

$num = number_format($n);
print $num." (notice how it's rounded up!)<br><br>";

$num = number_format($n, 2, '.', ',');
print $num."<br>";

The second is same as before but with the missing char!

 

 

Well you've actually solved it!

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.