Fill Zero On Php

[Solved] Fill Zero On Php | Php - Code Explorer | yomemimo.com
Question : fill zero on php

Answered by : topandhi-omega

$number = 12;
$width = 4;
$padded = str_pad((string)$number, $width, "0", STR_PAD_LEFT); 

Source : https://stackoverflow.com/questions/1443586/zerofill-a-integer-php | Last Update : Fri, 10 Sep 21

Answers related to fill zero on php

Code Explorer Popular Question For Php