I'm pulling a number from a MySQL database column and I want to format that number as currency. For instance, the column value is '85000000'
and I want that to be formatted as '$85,000,000'
.
I've tried a few methods but can't seem to get it to work. Thanks for the help.
<?php
$value = 85000000;
echo "$".number_format($value, 2, '.', ',');
?>
If you don't want any decimal places, change the 2 to 0.