php numbers 791 792 foreach numbers as numb offset strlen numb -1 one

1
2
3
4
5
6
7
8
<?php
$numbers = [791, 792];
foreach($numbers as $numb) {
$offset = strlen($numb) -1;
$one = substr($numb, 0, $offset);
$two = substr($numb, $offset);
echo "{$one}0000{$two}", PHP_EOL;
}