Personally, I'd use sprintf to return a formatted string:
$zeropaddedvariable = sprintf( "%02d", $variable);
Using $zeropaddedvariable as an integer after this is no problem....PHP will automagically use it as an integer, but you will lose your leading zero and will have to run it through sprintf() again.
-Rich