price()
price(integer|float $val, array $options) : string
Format a number as price.
$options:
- string "class" The css class to apply to the element if the number is negative (default: "red")
- string "currency" The currency code that the price is in (use Html::getCurrencies() to get supported currency codes)
- string "symbol" Instead of a currency a symbol can be provided directly (default: "£")
- string "symbolp" The same as symbol except it is added after the price, not before it
- int "decimalPlaces" The number of decimal places the price should show (default: 2)
Parameters
integer|float | $val | The number to format |
array | $options | An array of options (see above) |