中央論壇 - CENTER BBS
標題:
[PHP] 數學數字函數彙整 - Numeric Functions (小數點.etc)
[打印本頁]
作者:
死神
時間:
2015-10-23 11:15
標題:
[PHP] 數學數字函數彙整 - Numeric Functions (小數點.etc)
此為PHP數學數字函數彙整,將會持續增改維護。
number_format()
數字格式化,千位分組,支援小數點。
number_format(1000.123, 2) = 1,000.12
number_format(1000.123, 2, ",", "") = 1000.12
複製代碼
round()
四捨五入,支援小數位數
ceil()
無條件進入
floor()
無條件捨去
[PHP] 數學數字格式函數彙整 - Numeric Format Functions - (小數點.etc)
歡迎光臨 中央論壇 - CENTER BBS (https://www.centerbbs.com/)
Powered by Discuz! X3