There is a price entry form "from" and "to" when a person enters numbers, they look like this: "10,000" and "20,000"
enter image description here
How to make them grouped by 3 like this:
"10,000" and "20,000"

  • ru.stackoverflow.com/questions/744725/… - There is already a solution. - Manitikyl
  • what does it mean to "group by 3 like this:" what kind of group is it? formatting numbers? - Arsen
  • at the input that they were 3 "000 000 000" - daniells
  • This is called number_format. there is such a function in PHP, and for Javascript - here ru.stackoverflow.com/questions/743911/… - Arsen
  • I feel better on php, what is the name of the function in php? - daniells

1 answer 1

javaScript has a method

number.toLocaleString() 

it returns a string containing the number you need