Is it possible to put a currency symbol before rounding off the values ? or Alternatives maybe .
echo number_format((float)$overall_total, 2, '.', ''); //748.10
Expected output should be : $ 748.10
From tims's comment:
echo '$'.number_format
echo '$'.number_format((float)$overall_total, 2, '.', '');
$number = 1234.56;
// let's print the international format for the en_US locale
setlocale(LC_MONETARY, 'en_US');
echo money_format('%i', $number) . "
";
// USD 1,234.56
For more details: https://www.php.net/manual/en/function.money-format.php
Try to use money_format()
setlocale(LC_MONETARY, 'en_US');
echo money_format('%i', $number) . "
";
For details please look money-format.php