有时候我们为了将数字对齐,好看,就在前面补0对齐
<?php $temp = 10000000;//8位 $num = 11; $num = $temp+$num; $num = substr($temp,6,4);//结果0011 ?>
有时候我们为了将数字对齐,好看,就在前面补0对齐
<?php $temp = 10000000;//8位 $num = 11; $num = $temp+$num; $num = substr($temp,6,4);//结果0011 ?>
转载于:https://www.cnblogs.com/hanshuai0921/p/6689382.html