Append 0 To String In Php

[Solved] Append 0 To String In Php | Php - Code Explorer | yomemimo.com
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

Answers related to append 0 to string in php

Code Explorer Popular Question For Php