note 64120 deleted from function.preg-replace by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 20:01:00 +0000 |
| Subject: | note 64120 deleted from function.preg-replace by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127694@lists.php.net to get a copy of this message | ||
Note Submitter: sesha_srinivas at yahoo dot com
----
If you have a form element displaying the amounts using "$" and ",". Before
posting it to the db you can use the following:
$search = array('/,/','/\$/');
$replace = array('','');
$data['amount_limit'] =
preg_replace($search,'',$data['amount_limit']);