It seems that 1 would be more in the display as it is putting in the table so using a +1 would solve the print.
foreach ($dados as $key => $reg) {
$newKey = $key +1;
$table .= '<tr>
<td width="3%">' . $newKey . '</td>
<td width="18%">' . $reg['nome_clientet'] . '</td>
</tr>';
Soon, you would use the $newKey
in the prints and the $key
in the backend.
Or for the array to actually start from scratch it should work like this:
array_push($array[0], $array); #adiciona o primeiro elemento como ultimo (para nao perder dados)
unset($array[0]); #apaga primeiro elemento do array.
That’s right, man. Thank you very much.
– Eduardo Santos