convert date to string php no leading zero code example
Example 1: php pad leading zeros
str_pad($value, 8, '0', STR_PAD_LEFT);
Example 2: format a number with leading zeros in php
sprintf('%06d', '12')
str_pad($value, 8, '0', STR_PAD_LEFT);
sprintf('%06d', '12')