Created
June 16, 2016 09:47
-
-
Save platoosom/1378ea8f711197036f345b74f9fa639c 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'; | |
$prefix = '0000'; | |
$result = ''; | |
$result = $prefix.$number; | |
$result = substr($result,-4); | |
echo $result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment