In php, when I increment:
$numb = "00001"; $numb = $numb +1;
The result is 2.
How do I keep the zeroes and having 00002 ?
00002
Useful link for BASH and for JAVA but not able to think of a php version.
Thank you!
Try this:
$numb = "00001"; $numb = $numb +1; echo str_pad($numb, 5, '0', STR_PAD_LEFT);
https://3v4l.org/gah5c