public function toNum($string) { $final = str_replace(array(',', '$', ' '), '', $string); return (double) $final; }