Array Dinâmico
Galera,
Estou precisando de uma ajuda ao trabalhar com Array Dinâmico. Estou fazendo da seguinte forma:
Loop PHP:
<?php
while($totf = $totalf->fetch(PDO::FETCH_ASSOC)) {
var_dump($totf);
//}
?>
<tr>
<td><?php //echo trim($totf['FATURA']); ?></td>
<td><?php //echo trim($totf['EMISSAO']); ?></td>
<td><?php //echo trim($totf['CONTATO']); ?></td>
<td><?php echo trim($totf['Reserva']); ?></td>
</tr>
<?php
}
?>
Resultado do SQL:
array (size=31)
'NM_SET' => string '' *(length=0)*
'IS_SET' => string '0' *(length=1)*
'IS_FOR' => string '6' *(length=1)*
'Fornecedor' => string 'AZUL LINHAS AEREAS' *(length=18)*
'Passageiro' => string 'NICORRAY' *(length=15)*
'Reserva' => string '335 ' *(length=10)*
'Emissao' => string '28/03/2014' *(length=10)*
'VlOriginal' => string '0.00' *(length=4)*
'Moeda' => string 'R *(length=2)*
'Cambio' => string '1' *(length=1)*
'NR_MST_BIL' => string '5229367270' *(length=10)*
'NR_MST_OPV' => null
'Solicitacao' => string '' *(length=0)*
'Saida' => null
'Dt_Entrada' => null
'Dt_Saida' => null
'Valor' => string '0.00' *(length=4)*
'Rota' => null
'Produto' => string 'Aéreo' *(length=6)*
'Complemento' => null
'Taxas' => string '0.00' *(length=4)*
'Taxa_Servico' => string '0.00' *(length=4)*
'Desconto' => string '0.00' *(length=4)*
'Total' => string '40.00' *(length=5)*
'Observacao' => string ' ' *(length=1)*
'Taxas_Repasse' => string '40' *(length=2)*
'Integracao' => string 'ADVA8Q43G1' *(length=10)*
'TP_CLI_DED_ISS' => string 'P' *(length=1)*
'TP_CLI_INC_ISS_TDU' => string 'N' *(length=1)*
'TP_CLI_INC_ISS_TSE' => string 'N' *(length=1)*
'TX_IEM' => null
array (size=31)
'NM_SET' => string '' *(length=0)*
'IS_SET' => string '0' *(length=1)*
'IS_FOR' => string '10' *(length=2)*
'Fornecedor' => string 'TAM LINHAS AEREAS' *(length=17)*
'Passageiro' => string 'PEDRO KASSAB MR' *(length=15)*
'Reserva' => string '334 ' *(length=10)*
'Emissao' => string '31/03/2014' *(length=10)*
'VlOriginal' => string '2260.00' *(length=7)*
'Moeda' => string 'R *(length=2)*
'Cambio' => string '1' *(length=1)*
'NR_MST_BIL' => string '2486673153' *(length=10)*
'NR_MST_OPV' => null
'Solicitacao' => string '' *(length=0)*
'Saida' => null
'Dt_Entrada' => null
'Dt_Saida' => null
'Valor' => string '2260.00' *(length=7)*
'Rota' => null
'Produto' => string 'Aéreo' *(length=6)*
'Complemento' => null
'Taxas' => string '87.01' *(length=5)*
'Taxa_Servico' => string '0.00' *(length=4)*
'Desconto' => string '0.00' *(length=4)*
'Total' => string '2573.01' *(length=7)*
'Observacao' => string ' ' *(length=1)*
'Taxas_Repasse' => string '226' *(length=3)*
'Integracao' => string '1910417' *(length=7)*
'TP_CLI_DED_ISS' => string 'P' *(length=1)*
'TP_CLI_INC_ISS_TDU' => string 'N' *(length=1)*
'TP_CLI_INC_ISS_TSE' => string 'N' *(length=1)*
'TX_IEM' => null
Erro retornando por cada campo **<?php echo trim($fat->Reserva); ?>** **Notice: Trying to get property of non-object in...**Discussão (7)
Carregando comentários...