php format number currency code example
Example 1: format php currency
<?php
$number = 1234.56;
$english_format_number = number_format($number);
$nombre_format_francais = number_format($number, 2, ',', ' ');
$number = 1234.5678;
$english_format_number = number_format($number, 2, '.', '');
Example 2: php numberformatter currency without symbol
$fmt = new NumberFormatter('en_GB', NumberFormatter::CURRENCY);
$fmt->setSymbol(NumberFormatter::CURRENCY_SYMBOL, '');
echo $fmt->formatCurrency($price, 'EUR');