Display the drop-down list

money_format()

« mktime | mt_getrandmax »
<?php
$string 
setlocale (
    
LC_MONETARY// int $category
    
 // string $locale
);

$string money_format (
    
// string $format
    
  // float $number
);
?>
Result
$string = 'The final value is GBP1,234.56 (after a 10% discount)'
Examples
#1 money_format  (/* $locale = "en_US" */
 
"%i",
 -
1234.5672)
#2 money_format  (/* $locale = "it_IT" */
 
"%.2n",
 -
1234.5672)
#3 money_format  (/* $locale = "en_US" */
 
"%(#10n",
 -
1234.5672)
#4 money_format  (/* $locale = "en_US" */
 
"%=*(#10.2n",
 -
1234.5672)
#5 money_format  (/* $locale = "de_DE" */
 
"%=*^-14#8.2i",
 
1234.56)
#6 money_format  (/* $locale = "en_GB" */
 
"The final value is %i (after a 10%% discount)",
 
1234.56)
See also
number_format, printf, setlocale, sprintf, sscanf