Skip to content
Advertisement

How can I add commas to numbers in PHP

I would like to know how can I add comma’s to numbers. To make my question simple.

I would like to change this:

JavaScript

To:

JavaScript

and :

JavaScript

to

JavaScript

and so on for larger numbers. Is it possible with a php function?

Advertisement

Answer

from the php manual http://php.net/manual/en/function.number-format.php

I’m assuming you want the english format.

JavaScript

my 2 cents

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement