Remove Money Formatting

This will remove all non-integer characters, including commas and currency symbols. The output is a float.

$float = floatval(preg_replace('/[^\d\.]/', '', '$100.25')); // 100.25
Facebook
Twitter
LinkedIn