<? Php           
        $sourceNumber =  "1";            
        $newNumber =  Substr (strval ($sourceNumber + 1000), 1, 3);            
        Echo  "$newNumber";            
? >       

will appear at this time: 001  
if want to increase the digits 1000 can be increased, then put 3 also increased.  
example: if I want to make up   "4 0"   第03 line   Will become like this.  

<? Php           
$newNumber =  Substr (strval ($sourceNumber + 100000), 1, 5);            
? >       

is a total to display several Numbers, put $sourceNumber how many 0, + 1 up behind the last digit is directly to show a few Numbers.

better way:
string  Str_pad   (  string  $input,   int  $pad_length   [,   string  $pad_string   [,   int  $pad_type]] &NBSP;)


<? Php         
$input =  "Alien";          
echo  Str_pad ($input,   10);                                              
//  Produces  "Alien         "          
echo  Str_pad ($input,   10,   "-=",   STR_PAD_LEFT);        
//  Produces  "-=-=- Alien"          
echo  Str_pad ($input,   10,   "_",   STR_PAD_BOTH);          
//  Produces  "__Alien___"          
echo  Str_pad ($input,   6  ,   "___");                                  
//  Produces  "Alien_"          
? >       


filling the length of the string. To pad_string   Fill. The default is on the right, if STR_PAD_LEFT is complement to the left, STR_PAD_BOTH both sides together.
with str_pad next time, after all is a built-in, affirmation is faster than a custom./*

the method above I think is not so good, you introduce me to write a method. Method function as follows, so that when you want to the results of the 001, methods: dispRepair (' 1 ', 3, '0')
function: fill a function
STR: the original string
type: type, 0 for repair, after 1 before
len: new string length
MSG: fill characters */


function dispRepair ($STR, $len, $MSG, $type='1') {
$length=$len - strlen ($STR);
if ($length<1) return $STR;
if ($type==1) {
$STR=str_repeat ($MSG, $length). $STR;
} else {$STR.
=str_repeat ($MSG, $length);

} return $STR;

}


This concludes the body part