Created
June 16, 2016 09:53
-
-
Save platoosom/0395cd99e7016dd5ba54f0d80e441d44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$number = '1'; | |
$result = ''; | |
$result = str_pad($number, 4, '0', STR_PAD_LEFT); | |
echo $result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment