Advertisement
Guest User

jj

a guest
Jan 22nd, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. $conn = mysqli_connect("localhost","id12232563_rajan", "bardangrg1", "id12232563_hopitalnearby");
  4.  
  5. $records = mysqli_query($conn,"select * from hospital");
  6.  
  7. $data = array();
  8.  
  9. while($row = mysqli_fetch_assoc($records))
  10. {
  11. $data[] = $row;
  12. }
  13.  
  14. echo json_encode($data);
  15.  
  16. mysqli_close($conn);
  17.  
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement