I want to add a comma after 4 characters are typed in by a user in an input field (which will be numbers). For example: user types in 1234 and I would like it to display 1,234 as soon as they type in the fourth character, which is 4 in the example. Any ideas would be appreciated... thanx!
You would need to do this in Javascript, not PHP. Here's a thread I found that should do it: http://www.codingforums.com/showpost.php?p=214377&postcount=3
It can be done only ( if we need to choose from the most common options ) via JavaScript ( which is client side language ).
Take a look at this, it should be what you're looking for: http://www.codingforums.com/showthread.php?t=41057 http://lcognard.free.fr/javascri/patterns/formatage_financier.htm
Thank you all for your replies. I wasn't sure if PHP could do it. Now I am gonna look at the javascript links you guys posted. Thanks so much!