foreach ($sql as $key => $item):
?>
<tr>
<th class="small"><?php echo $item['ID']; ?></th>
<th class="small"><?php echo $item['CODFIL']; ?></th>
<th class="small"><?php echo $item['NUMPED']; ?></th>
<th class="small"><?php echo $item['CODPRO']; ?></th>
<th class="small"><?php echo $item['NOMCLI']; ?></th>
<th class="small"><?php echo $item['QTDFAT']; ?></th>
<th class="small"><?php echo $item['CIDCLI']; ?></th>
<th class="small"><?php echo $item['CPLIPD']; ?></th>
<th class="small"><?php echo $item['NOMTRA']; ?></th>
<th class="small"><?php echo $item['NOMMOT']; ?></th>
<th class="small"><input class="form-control form-control-sm" type="text" style="width: 60; text-align: center; margin-right: auto; margin-left: auto"></th>
<th class="small">
<select class="form-control form-control-sm" id="poscar">
<option><?php echo $item['POSCAR']; ?></option>
<option value="D">D</option>
<option value="C">C</option>
<option value="L">L</option>
</select>
</th>
<th class="small"><?php echo $item['DATCHE']; ?></th>
<th> <input TYPE="submit" id="botao" value="Enviar" >
</th>
</tr>
<?php endforeach; ?>