I have encountered this before, and below is what I have used last. http://www.php.net/manual/en/class.numberformatter.php
Before I am using preg_match using [0-9\,\s.]+ pattern. Then I have replaced all special characters and letters to blank to get the integer. (not a good solution)
Example code taken from http://www.pagecolumn.com/tool/pregtest.htm
<?php
$ptn = "/[0-9\,\s\.]+/";
$str = "$9,988,776.65 in the United States";
preg_match($ptn, $str, $matches);
print_r($matches);
?>
Output
Array
(
[0] => 9,988,776.65
)
After I realised that it was not a good solution, I revised it to simpler solution using the code below. from: Remove non-numeric characters (except periods and commas) from a string
$number = "$9,988,776.65";
echo preg_replace("/[^0-9]/", "", $number);
Output
998877665
if you did not remove the thousands and decimal symbol it will get the number format of the currency.
Regarding the progress bar, you need to convert the totals to 100%. I assume that your formula is similar below:
(price/free_shipping_minimum)*100
if result goes over 100 then set it to 100%. if you don't want decimals in your percentage cast it to int or use php's round/ceil/floor function.
http://www.php.net/manual/en/function.round.php
I hope this helps a lot.