In php
I get two parameters, the codigo
and the cantidad
, the codigo
can be PDO0016890
and the cantidad
can be 10000
which are the number of times the increase will be number of codigo
.
$code = $_POST['code'];
$cant = intval($_POST['cant']);
$nums = preg_split('/[^0-9]+/i', $code);
$strings = preg_split('/[^a-zA-Z]+/i', $code);
$intN = $nums[1];
for($i = 0; $i < $cant; $i++){
echo json_encode($intN++);
}
PROBLEM:
when you go through the arrangement in the first 'round' it shows 0016890
but from the second 'round' shows 16891
, 16892
, etc ..., that is to say it takes away the 00,
How could I validate that I do not remove those zeros?