I woudlike to return a number with php with 0 before like
0001 or 00006.
I found 2-3 solutions on internet to write a 0005 string with php's method :
sprintf("%02d", $num);
str_pad($month, 2, '0', STR_PAD_LEFT);
but this return string, not number.
Do you know if exist a way to get a 00001 number ?
question from:
https://stackoverflow.com/questions/65876276/php-a-number-with-0-before 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…