I\'m trying to format revenue totals as grabbed from a db, and using php\'s NumberFormatter class, with the formatCurrency method.
However, I do not want to print ou
A simple regex is a quick fix for your problem. Try;
$actual = $formatter->formatCurrency($array['total_revenue'], 'EUR') . PHP_EOL; $output = preg_replace( '/[^0-9,"."]/', '', $actual ); echo $output;
Hope this helps