format_currency
function format_currency($number)
Returns string containing a number formatted as currency according the system currency settings. You may change the system currency settings on System/Settings/Currency page. Default system currency is USD and has format $10,000.00
Parameters
- $number - a value to output
Return value
Returns string.
Examples
The following code outputs a product price.
<p class="price">Price: <?= format_currency($product->price()) ?></p>
Next: h
Previous: flash_message
Return to Reference


Comments
No comments posted so far.
Add your comment
Loading form...