llms_trim_zeros( mixed $price )
Trim trailing zeros off a price
Parameters Parameters
- $price
-
(mixed) (Required) Price string.
Return Return
(string)
Source Source
File: includes/functions/llms.functions.currency.php
function llms_trim_zeros( $price ) { return preg_replace( '/' . preg_quote( get_lifterlms_decimal_separator(), '/' ) . '0++$/', '', $price ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |