Question : append 0 to string in php
Answered by : thoughtful-tapir-65jf5j43b8fw
// Use sprintf :
sprintf('%08d', 1234567);
// Alternatively you can also use str_pad:
str_pad($value, 8, '0', STR_PAD_LEFT);
Source : | Last Update : Thu, 15 Dec 22
Answered by : thoughtful-tapir-65jf5j43b8fw
// Use sprintf :
sprintf('%08d', 1234567);
// Alternatively you can also use str_pad:
str_pad($value, 8, '0', STR_PAD_LEFT);
Source : | Last Update : Thu, 15 Dec 22