llms_trim_zeros( mixed $price )

Trim trailing zeros off a price


Description Description


Parameters Parameters

$price

(mixed) (Required)


Top ↑

Return Return

(string)


Top ↑

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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.