Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. <?php
  2. $sql = "SELECT img FROM mytable LIMIT 0,3";
  3. $result = mysqli_query($conn, $sql);
  4. $total = mysqli_num_rows($result);
  5. $i=0;
  6.  
  7. while($row = $result->fetch_assoc()) { //this line
  8.  
  9. echo $row['img'];
  10.  
  11. $i++; }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement