0
I have a foreach
that where I need to add the value of the variable to a array
:
foreach ($xml->NFe->infNFe->det as $itens){
$quantidade = round($itens->prod->qCom);
$total_quant_unidade = array();
array_push($total_quant_unidade, $quantidade);
}
The problem is that only the ultimate value is added even within the foreach
.
it was stupid of mine I was creating the array every time the foreach passed , thank you very much
– user215539