3
This variable of mine:
$valor = $cliente->cobrancas[1]->valor;
echo '<pre>';
print_r($cliente);
echo '<pre>';
Print the values below:
stdClass Object
(
[id] => 24151
[nome] => PAULO ANDRE ROCHA MOTTA
[endereco] => RUA CARMELA DUTRA 400 APTO 301
[bairro] => AGRIOES
[cidade] => TERESOPOLIS
[cep] => 25963140
[uf] => RJ
[pontos] => 0
[indicados] => Array
(
)
[cobrancas] => Array
(
[0] => stdClass Object
(
[id] => 527561
[nossonumero] => 3045835
[dataemissao] => 1346900400
[datavencimento] => 1347246000
[datapagamento] => 1347246000
[dias_vencidos] => 1344
[mora] => 0.53651612903226
[multa] => 4.158
[valor] => 207.90
[valorpago] => 196.47
[valordesconto] => 10.00
[jurosmora] => 0.00
[banco] => 33
[agencia] => 1525
[dac_agencia] => 0
[conta] => 013000045
[dac_conta] => 2
[carteira] => 201
[nome_empresa] => STOCK MIDIA INF. LTDA
[cod_cedente] => 1640348
)
[1] => stdClass Object
(
[id] => 527562
[nossonumero] => 3045836
[dataemissao] => 1346900400
[datavencimento] => 1349406000
[datapagamento] => 1349406000
[dias_vencidos] => 1319
[mora] => 0.30425806451613
[multa] => 2.358
[valor] => 117.90
[valorpago] => 106.47
[valordesconto] => 10.00
[jurosmora] => 0.00
[banco] => 33
[agencia] => 1525
[dac_agencia] => 0
[conta] => 013000045
[dac_conta] => 2
[carteira] => 201
[nome_empresa] => STOCK MIDIA INF. LTDA
[cod_cedente] => 1640348
)
[2] => stdClass Object
(
[id] => 527563
[nossonumero] => 3045837
[dataemissao] => 1346900400
[datavencimento] => 1352080800
[datapagamento] => 1352080800
[dias_vencidos] => 1288
[mora] => 0.30425806451613
[multa] => 2.358
[valor] => 117.90
[valorpago] => 106.47
[valordesconto] => 10.00
[jurosmora] => 0.00
[banco] => 33
[agencia] => 1525
[dac_agencia] => 0
[conta] => 013000045
[dac_conta] => 2
[carteira] => 201
[nome_empresa] => STOCK MIDIA INF. LTDA
[cod_cedente] => 1640348
)
[3] => stdClass Object
(
[id] => 527564
[nossonumero] => 3045838
[dataemissao] => 1346900400
[datavencimento] => 1354672800
[datapagamento] => 1354672800
[dias_vencidos] => 1258
[mora] => 0.30425806451613
[multa] => 2.358
[valor] => 117.90
[valorpago] => 106.47
[valordesconto] => 10.00
[jurosmora] => 0.00
[banco] => 33
[agencia] => 1525
[dac_agencia] => 0
[conta] => 013000045
[dac_conta] => 2
[carteira] => 201
[nome_empresa] => STOCK MIDIA INF. LTDA
[cod_cedente] => 1640348
)
[4] => stdClass Object
(
[id] => 527565
[nossonumero] => 3045839
[dataemissao] => 1346900400
[datavencimento] => 1357351200
[datapagamento] => 1357524000
[dias_vencidos] => 1227
[mora] => 0.30425806451613
[multa] => 2.358
[valor] => 117.90
[valorpago] => 106.47
[valordesconto] => 10.00
[jurosmora] => 0.00
[banco] => 33
[agencia] => 1525
[dac_agencia] => 0
[conta] => 013000045
[dac_conta] => 2
[carteira] => 201
[nome_empresa] => STOCK MIDIA INF. LTDA
[cod_cedente] => 1640348
)
How can I make the function print always and only the last valor
???
I thought about the
end()
but didn’t even remember that it returned the last element, I remembered that it set the pointer to the end. + 1– rray
Thank you worked, thank you
– user22753