Advertisement
gundambison

perbaikan 85 - input

Sep 10th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1.  <?php
  2. $tingkatanedit = $profil->id_tingkatan;
  3. $etingkatan    = explode(",", $tingkatanedit);
  4. $jlh           = count($etingkatan);
  5. $nTingkat      = $jlh - 1;
  6. $val           = 0;
  7. $inc           = 0;
  8. foreach ($tingkatan as $t => $row) {
  9. ?>
  10.  
  11. <input type="checkbox" name="idtingkatan"
  12. <?php
  13.     $val = 0;
  14.     while ($val <= $nTingkat) {
  15.         if ($row->id_tingkatan == $etingkatan[$val]) {
  16.             echo 'checked';
  17.            
  18.         }
  19.         $val++;
  20.     }
  21. ?>
  22. />
  23. <?php
  24.     echo $row->id_tingkatan;
  25. ?>
  26. &nbsp;
  27. <?php
  28.     $inc++;
  29. }
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement