how bout something like this:
$string = '#Exchange rates for installation 52328
#Mon Aug 16 18:04:09 GMT+00:00 2004
USD_EUR=0.8464257299615312
rateDateString=2004-08-16
USD_USD=1.0
allRatesCurrent=true
rateDateMillis=1092614400000
USD_CAD=1.3709886615622777';
$array = explode("\n", $string);
foreach ($array as $value)
{
if ($value{0} != '#')
{
$explode = explode('=', trim($value));
$sql_array[] = $explode[0] . " = '" . $explode[1] . "'";
}
}
$sql = 'INSERT INTO table SET ' . implode(', ', $sql_array);
echo $sql;