psMoneySimple() Returns money in a simple format
Description:
This returns a string representing money, and returns it in a simple format Format: 9,999.99
Usage:
$str = psMoneySimple($numString)
Example:
$str = psMoneySimple("$ 5,232.12"); // returns "5,232.12"
Code:
function psMoneySimple($m) { $m = trim($m); $m = str_replace(",","",$m); $m = str_replace("\$","",$m); $m = number_format($m,2); return $m; }
Changlelog:
|
|