Search code examples
phpcurrencymoney-format

money_format, move the 'currency name'


I'm at the moment using the PHP money_format() function, and have money_format('%.0i', $row['price']) at the moment it outputs something like: DKK 199.900 - is there a way I can output it like 199.900 DKK instead?


Solution

  • Use number_format instead (this is cross OS compatible too):

    $value = number_format($value, [decimal places]).' DKK';