I have the following code:
foreach ($class->ListaChave($CdLote) as $dados) {
var_dump($dados->getQvol());
}
Output:
string(1) "1"
string(1) "1"
string(1) "2"
string(1) "1"
I need these values to be summed and to return the value inside a variable.