function string_to_float($string) { $float_val = str_replace(array('.', ','), array('', '.'), $string); return floatval($float_val); }