Home > php教程 > php手册 > body text

常用数学函数:php几个常用的数学函数

WBOY
Release: 2016-06-21 08:51:12
Original
1128 people have browsed it

echo mt_rand(1,100); //输出1-100之间的随意整数,包括1和100
echo number_format(10000,2); //将整数格式化(3位一个,取2位小数)
floor() 返回num的最小整数
ceil() 返回num的最大整数
round() 四舍五入
min() 求最小值或数组中的最小值
max() 求最大值或数组中的最大值
pow(2,3) 2的3次方
本文链接http://www.cxybl.com/html/wlbc/Php/20121020/33082.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!