$id = 23;
$sn = 0023;
添加前导零:
方法一:$sn = sprintf("%04d",$id);
方法二:$sn = str_pad($id,4,"0",STR_PAD_LEFT);
去掉前导零:
方法一:$id = intval($sn);
方法二:$id = ltrim($sn,"0");
http://pcwanli.blog.163.com/blog/static/4531561120122129305185/
Wednesday, 30 August 2017
Subscribe to:
Post Comments (Atom)
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required.
zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required. h...
-
Grows your business with zomok online ordering platform. Zero commission. Suitable for restaurants, kopitiam, food, groceries, pet supplie...
-
Complete TFTP Server example, using Indy components There are not many good TFTP server examples out there, so I wrote this example of...
No comments:
Post a Comment