PHP数字补充0

$var=sprintf("%03d", 5);

结果为005

 

posted @ 2021-01-16 09:19  酒过三巡  阅读(72)  评论(0)    收藏  举报