What's the best way to format input such as "10.00" or "10,00" . I need to deduct the user's input from a amount in the database, however with the dots and commas it doesn't let them proceed and gives them an error. I think it's not so professional, so I would like to change how it works. Only whole amounts are allowed, no cents. I need to extract the number somehow and get rid of the unneeded, because they tend to use amounts that I named before instead of just whole numbers.
number_format be what you are looking for. Some additional details are available here: http://php.net/manual/en/function.number-format.php $number = 1234.56; $english_format_number = number_format($number); // 1,235 - Chad www.ChadAyers.org
> I have a textbox that displays money, I cannot find out how to format > it so it displayes like '$123.00' what i get now is '123.00'. Can > someone point me in the right direction?[/color] myvalue.ToString("C");