Tengo una duda y espero me puedan ayudar a resolverla.(Estoy trabajando con PHPExcel leyendo un archivo)
Tengo este código:
Código PHP:
lo que quiero agrupar las variables "$pagadora_chk" y "banco_chk" y sumar "$monto_chk" en el resultado que me imprime. Alguien sabe si es posible?Ver original
$count_chk=141; $fila_chk=0; while($fila_chk<=39){ $fila_chk++; $count_chk++; $concep_chk='CHEQUE'; $pagadora_chk=$objWorksheetInt->getCellByColumnAndRow(1, $count_chk)->getValue(); $banco_chk=$objWorksheetInt->getCellByColumnAndRow(0, $count_chk)->getValue(); $monto_chk=$objWorksheetInt->getCellByColumnAndRow(3, $count_chk)->getValue(); echo" <tr class='fila4'> <td style='border:2px outset; width:auto;'><input name='concep_pd".$fila_chk."' type='text' readonly value='".$concep_chk."'></td> <td style='border:2px outset; width:auto;'><textarea name='pag_pd".$fila_chk."' readonly class='pagadoraPercep'>".$pagadora_chk."</textarea></td> <td style='border:2px outset; width:auto;'><input name='banc_pd".$fila_chk."' type='text' readonly class='bancosPercep' value='".$banco_chk."'></td> <td style='border:2px outset; width:auto;'><input name='monto_pd".$fila_chk."' type='text' class='montoDcnPcn' readonly value='".$monto_chk."'></td> <td style='border:2px outset; width:auto; display:none;'><input name='val_pd".$fila_chk."' type='text' class='pivotePerDed' readonly value='Percepciones'></td> <td style='border:2px outset; width:auto; display:none;'><input name='contar' type='text' class='contar_chk' value='".$count_chk."'></td> </tr>"; }
Agradezco de antemano su ayuda!!!!!