Virajsinh

check_box

Sep 3rd, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1.                                 <?php while($row = mysqli_fetch_assoc($result)){ ?>
  2.                                     <label class="checkbox-inline">
  3.                                         <?php $study_arr = explode(",", "1,2,4"); ?>
  4.                                         <input type="checkbox" name="study_id[]" value="<?=$row['id'];?>" <?php if(in_array($row['id'], $study_arr)){ echo "checked"; } ?>><?=$row['name'];?>
  5.                                     </label>
  6.                                 <?php } ?>
  7.  
  8.             // checking whether a file is directory or not
  9.             if (is_dir($myfile))
  10.             echo ("$myfile is a directory");
  11.             else
  12.             echo ("$myfile is not a directory");
Add Comment
Please, Sign In to add comment