Created
December 5, 2011 21:23
-
-
Save prcaen/1435422 to your computer and use it in GitHub Desktop.
[PHP] - Two digits
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
private function twoDigits($number) | |
{ | |
if($number <= 9) | |
return '0' . $number; | |
else | |
return $number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment