Hi!

I am coding a quite simple php form where many of the input forms are going to be filled with numbers. Is there a simple way I could get the numbers separated by thousands? Like the form showing 100 000 instead of 100000?

Thanks in advance!

Recommended Answers

All 7 Replies

Do you want your output to show the numbers that way, or do you want to change after a user inputs a value and leaves the editbox. In the last case, this would be more of a javascript issue.

I would prefer if it changed after the user inputs a value ald leaves the editbox, but really any way works.

number_format("123456")
Member Avatar for diafol

Ok for you guys suggesting php, he stated:

>I would prefer if it changed after the user inputs a value ald leaves the editbox, but really any way works.

That suggests JS. I don't think he wants to submit the blasted form every time he changes the edit box contents.

Thanks, guys! The solution was js, and it works great :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.