2011年5月18日 星期三

【心得】PHP - 取代小數後多餘的0-replace the extra decimal zero


$say='$1';

$data = preg_replace('/\.*[0]{0,}$/Ui', $say, sprintf("%11.6f",$input));




基本上就這樣而已
不知道有沒有BUG

So it is all
Not know if there have other BUG
.....

沒有留言:

張貼留言