//--Generando Cuerpo $j = 9; $cuerpo = "<tr>"; for ($i = 0; $i <= count($rs) - 1; $i++) { $cuerpo .= "<td width='10%'>" . $rs[$i][1] . "</td>\n\t\t\t\t <td width='10%'>" . $rs[$i][2] . "</td>\n\t\t\t\t <td style='text-align:left;' width='10%'>" . $rs[$i][3] . "</td>\n\t\t\t\t <td style='text-align:left;' width='10%'>" . $rs[$i][7] . "</td>"; for ($k = 0; $k < $rs[0][5]; $k++) { $nota_un = $rs[$i][$j]; if ($nota_un == "") { $nota_un = '0'; } $cuerpo .= "<td width='5%'>" . $nota_un . "</td>"; $j++; } //-- $nota_def = $rs[$i][14]; if ($nota_def == "") { $nota_def = '0'; } //-- $j = 9; $nota_un = ''; $cuerpo .= "<td width='5%;'>" . $nota_def . "</td></tr>"; } //--Paginacion $obj_paginador = new paginacion($actual, $obj_notas->num_rows2, $nom_fun); //-- $mensaje[0] = $cabecera; $mensaje[1] = $cuerpo; $mensaje[2] = $obj_paginador->crear_paginacion(); die(json_encode($mensaje)); }