Skip to content

Instantly share code, notes, and snippets.

View PHP - Adding leading or trailing numbers or characters to string
// source : https://stackoverflow.com/questions/1699958/formatting-a-number-with-leading-zeros-in-php
str_pad($string_to_complate, 2, '0', STR_PAD_LEFT);
You can’t perform that action at this time.