Advertisement
Guest User

Untitled

a guest
May 20th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. $output=array();
  2. /* Select queries return a resultset */
  3. if ($result = mysqli_query($link, "SELECT * from cars")) {
  4. while ($row=$result->fetch_assoc()){
  5. $output[]=$row;
  6. }
  7. }
  8. mysqli_close($link);
  9. echo json_encode($output);
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement