Skip to content

Instantly share code, notes, and snippets.

@prcaen
Created December 5, 2011 21:23
Show Gist options
  • Save prcaen/1435422 to your computer and use it in GitHub Desktop.
Save prcaen/1435422 to your computer and use it in GitHub Desktop.
[PHP] - Two digits
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