I think I\'ve found where the error lies:
$convertJSON = file_get_contents(\"http://www.google.com/ig/calculator?hl=en&q=\" . $currencyValue . $curre
strip it of everything but decimal points, commas, and numbers, and give me a result.
Actually you do the exact contrary with your regex. Add a ^ after [: [^ to negate it
^
[
[^
$currencyValue = preg_replace('/([^0-9\.,]+)/', '', $currencyValue);