1
Given the array below:
$aDup = array(
array('35342-1','2016-06-20','300.00'),
array('35342-2','2016-07-20','300.00'),
array('35342-3','2016-08-20','300.00'),
array('35342-4','2016-09-20','300.00')
);
I created something like:
for($i=0; $i<$dados['dados']['n-parcelas']; $i++){
$val .= "array('".$id."-".($i+1)."','".$dados['dados']['vencimento-parcela'][$i]."','".$dados['dados']['parcela'][$i]."'),";
}
$val = substr($val, 0, -1);
$aDup = array($val);
But to no avail.
The information shall feed the following variables::
foreach ($aDup as $dup) {
$nDup = $dup[0]; // Código da Duplicata
$dVenc = $dup[1]; // Vencimento
$vDup = $dup[2]; // Valor
$resp = $nfe->tagdup($nDup, $dVenc, $vDup);
}
The first code does not result in the third? I did not understand the object nor how this 'conversion' should be done, could give more details;?
– rray
I want to take the first code and "create it" using information received via
$_POST
. @rray– lucasbento
Puts a
print_r()
of$_POST
in the question.– rray