Advertisement
kura2yamato

versi view

Oct 28th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     $result_a = $this->a_model->get_all();              //$query="select * from table_a";
  3.     foreach($result_a as $row):
  4. ?>
  5.     <ul>
  6.         <li><?= $row->id_a?></li>
  7.             <?php
  8. //$queyr = "select * from table_b where id_a = $row->id_a";
  9.             $result_b = $this->b_model->get_by($row->id_a, 'id');    
  10.  ?>
  11.             <?php foreach($result_b as $row):?>
  12.                 <ul>
  13.                     <li><?= $row->id_b ?></li>
  14.                 </ul>
  15.             <?php endforeach ?>
  16.     </ul>
  17. <?php endforeach ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement