I'm creating a mortgage calculator that asks the user to input a Principal Loan Amount. I use this amount with other numbers in a formula to figure out monthly payments. Right now my calculator works great if the user inputs a number with no commas, but how do I accept numbers with or without commas to use in my formula?
Thanks for any help.
Formatting input numbers
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
str_replace() them?