From: avl Date: Wed, 4 Mar 2009 18:20:42 +0000 (+0200) Subject: moneyFormat X-Git-Tag: 0.5~410 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=709fddf6a61a2bcd221cb7395bb674ff4e9ee53e;p=ipf.git moneyFormat --- diff --git a/ipf/utils.php b/ipf/utils.php index fb71f24..2e369d4 100644 --- a/ipf/utils.php +++ b/ipf/utils.php @@ -224,8 +224,7 @@ class IPF_Utils { return $i.substr((string)$f,2,6); } - static function TrimP($html) - { + static function TrimP($html){ $strL = "

"; $lenL = 3; $strR = "

"; $lenR = 4; if (0 == strcasecmp(substr($html, 0, $lenL), $strL) @@ -235,5 +234,9 @@ class IPF_Utils { return $html; } + static function moneyFormat($val){ + return number_format((float)$val,2); + } + }