note 117318 rejected from function.str-replace by cmb
| From: | cmb@php.net | Date: | Wed, 20 May 2015 16:29:10 +0000 |
| Subject: | note 117318 rejected from function.str-replace by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202624@lists.php.net to get a copy of this message | ||
Note Submitter: fngueraldo at hotmail dot com
----
Hi all..
Please i'm trying so hard to remove the character , and change for .(dot) , with no sucess...
can anyone take me a light ?
the price in my site appear 12,995 and i want show 12.995 , i'm not sure if i'm editing
the correct place but the code is :
if( isset( $_POST['_price'] ) ) {
$_POST['_price'] = str_replace(array('.', ' '),
array('', ''), strip_tags($_POST['_price']) );
}
Thank you !