Created
November 16, 2018 00:54
-
-
Save wichaksono/6b3ca90a0aa2547edaf97123a6182076 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
<?php | |
#.... ubah 4 jadi 04. dan seterusnya selama 1 digit, jika dua digit | |
# seperti 10, tidak akan berubah jadi 010 tapi tetap 10 | |
function two_digit($string) | |
{ | |
return sprintf('%02d', $string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment