SHOW:
|
|
- or go back to the newest paste.
| 1 | <h1>REKAP JUMLAH PENDUDUK</h1> | |
| 2 | <table class="table table-bordered centered" id="dataTable" width="100%" cellspacing="0"> | |
| 3 | <thead> | |
| 4 | <tr> | |
| 5 | <th width="5%" rowspan="2">No</th> | |
| 6 | <th width="15%" rowspan="2">RT</th> | |
| 7 | <th width="20%" rowspan="2">Jumlah KK</th> | |
| 8 | <th width="60%" colspan="3">Jumlah Penduduk</th> | |
| 9 | </tr> | |
| 10 | <tr> | |
| 11 | <th width="20%">Laki - laki</th> | |
| 12 | <th width="20%">Perempuan</th> | |
| 13 | <th width="20%">Jumlah</th> | |
| 14 | </tr> | |
| 15 | </thead> | |
| 16 | <tbody> | |
| 17 | <?php | |
| 18 | - | foreach ($data_rw->result() as $row) |
| 18 | + | foreach ($data_rw as $row) //->result() |
| 19 | {
| |
| 20 | ?> | |
| 21 | <tr class="bg-info"> | |
| 22 | <td colspan="2">Jumlah <?php echo $row->rw; ?></td> | |
| 23 | <td><?php echo $row->kk; ?></td> | |
| 24 | <td><?php echo $row->L; ?></td> | |
| 25 | <td><?php echo $row->P; ?></td> | |
| 26 | <td><?php echo $row->jumlah_penduduk; ?></td> | |
| 27 | </tr> | |
| 28 | <?php | |
| 29 | - | $no=1; |
| 29 | + | $no=1; $data_jumlah = $data_rw->rt; |
| 30 | foreach ($data_jumlah->result() as $row2) | |
| 31 | {
| |
| 32 | ?> | |
| 33 | <tr> | |
| 34 | <td><?php echo $no++; ?></td> | |
| 35 | <td><?php echo $row2->nama_rt; ?></td> | |
| 36 | <td><?php echo $row2->jumlah_kk; ?></td> | |
| 37 | <td><?php echo $row2->jumlah_l; ?></td> | |
| 38 | <td><?php echo $row2->jumlah_p; ?></td> | |
| 39 | <td><?php echo $row2->jumlah_penduduk; ?></td> | |
| 40 | </tr> | |
| 41 | <?php | |
| 42 | } | |
| 43 | ?> | |
| 44 | <?php | |
| 45 | } | |
| 46 | ?> | |
| 47 | </tbody> | |
| 48 | </table> |