With str_replace or even cropping:
$str = str_replace('$', '', $str);
$str = trim($str, '$'); // only delete $ at start or end of the string
There are many solutions for this. Also note that you should use the period separator for decimal and integer parts, not a comma.
source
share