One way to format currencies in PHP is to use the built-in money_format() function. Before using it you must set the locale for the type of currency you're trying to format.
What is the output of the following PHP script? The currency name for en_US is USD and uses $ as the currency symbol. Additionally, there are 100 cents to the dollar.
$amt = 100;
echo money_format('%.2n', $amt);