money format

I need to know how to use the money format, but rather than using a comman, it uses the html code for a comma. or I need to know how to replace the comma after it the formatted number comes out.

I tried this, but it didn’t work, said the comma wasn’t fun.
[php]<?php setlocale(LC_MONETARY, “en_US”);
$total1 = money_format("%n", $total); ?><?php $csv_output .= 'Totals';", "; ?>

<?php $comma= ',';?> <?php $total2 = preg_replace($comma, ',',$total1); ?> <?php echo $total2;?>[/php]

Well, here is a link that explains how to use the money formatting functions in PHP.
Look down a bit to the samples and you will find what you need… Good luck…

http://php.net/manual/en/function.money-format.php

Sponsor our Newsletter | Privacy Policy | Terms of Service