Re: Removing a comma from a form field
| From: | Leif K-Brooks | Date: | Thu, 13 Feb 2003 18:21:17 +0000 |
| Subject: | Re: Removing a comma from a form field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-135481@lists.php.net to get a copy of this message | ||
If the comma is all you have to worry about, you don't need regex. Use www.php.et/str-replace.
Ben C. wrote:
I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. Thanks, Ben-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.