Hi all
Would like to ask for help with how to format value into only 2 decimal numbers.
<td><?=formatter($netchainPrice->netchain->usd_market_cap) ?></td>
...
This gives me output : $4,566.7718 ...(But I want to use just $4,566.77)
Hi all
Would like to ask for help with how to format value into only 2 decimal numbers.
<td><?=formatter($netchainPrice->netchain->usd_market_cap) ?></td>
...
This gives me output : $4,566.7718 ...(But I want to use just $4,566.77)
Hello!
setlocale(LC_MONETARY, 'en_US');
$out = money_format('%n', '4566.7718');
echo $out;
// Output: $4,566.77