thieumao

json demo

Dec 9th, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. mysql_connect("localhost","root","");
  4. mysql_select_db("u727529355_tuvi");
  5. mysql_query("SET character_set_results=utf8");
  6. $sql="select * from tuvi order by id desc";
  7. $row=  mysql_query($sql);
  8. $data= mysql_fetch_assoc($row);
  9. $data2=  json_encode($data);
  10. print_r($data2);
  11.  
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment