将7位数字浮动到小数点左边

I need to get numbers in order but need them to be like this

0000001
0000002
0000003
etc.

I have tried a few different lines of code and nothing works. It always puts the 7 placed to the right of the decimal like this 1.0000000, 2.0000000

Here is what I currently have

$i = 0000001;
while ($i != 0001001){
$i = number_format("$i",7);
echo $i."<br />";
$i++;
}

You can use sprintf:

sprintf("%07d",$i);

So instead of number_format:

$i = 0000001;
while ($i != 0001001) {
    $i = sprintf("%07d", $i);
    echo $i . "<br />";
    $i++;
}