Frank Vilea Frank Vilea - 1 month ago 21
PHP Question

PHP show money_format without currency text

In PHP, is it possible to use money_format to display money without showing the currency or at least showing it in an abbreviated form?

Currently, I use:

$money = "1234.56";
setlocale("LC_ALL", "de_DE");
$money = money_format("%n", $money);

Answer Source

!

Seriously. that's the flag:

$money = money_format("%!n", $money);