If you have the Intl extension, you can use
Example from Manual
$fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY );
echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."
";
echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."
";
$fmt = new NumberFormatter( 'ru_RU', NumberFormatter::CURRENCY );
echo $fmt->formatCurrency(1234567.891234567890000, "EUR")."
";
echo $fmt->formatCurrency(1234567.891234567890000, "RUR")."
";
Output
1.234.567,89 €
1.234.567,89 RUR
1 234 567,89€
1 234 567,89р.
Also see my answer on how to parse that formatted money string back into a float:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…