![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php 基本语法
tangan456
好好玩代码
展开
-
php 获取变量的整数值 intval()
$str = '7852w';echo intval($str); // print 7852原创 2016-12-12 16:17:09 · 636 阅读 · 0 评论 -
PHP 四舍五入函数 round()
round(x,prec)参数描述x可选。规定要舍入的数字。prec可选。规定小数点后的位数。echo round(3.1415);// print 3echo round(3.1415, 3);// print 3.142原创 2016-12-12 16:00:32 · 11382 阅读 · 0 评论 -
PHP 26个英文字母递增
/** * 大写英文字母递增 * * chr() 函数从指定的 ASCII 值返回字符 * ord() 函数返回字符串第一个字符的 ASCII 值 * * @param string $str A-Z的英文字母 * @return string */function AZIncrement($str){ // 参数转换为大写 $str = strtouppe原创 2016-12-12 16:47:55 · 8697 阅读 · 0 评论