Update:
I did want to point out that the method using the regex to change the zeroes to the space assumes that your padded data didn't contain spaces at the end of the strings. For what we were padding, that was perfectly fine, but it may not be for you. So use that method with caution. :)
Oh, and one more approach:
$padded = $string . ("0" x (10 - length $string));