RE: How to convert MYSQL query result into JSON?

Convert MYSQL query result into JSON

B Mathur Team Leader Asked on February 11, 2017 in JSON.
Add Comment
1 Answers



include "db.php";



$sql=mysql_query("select * from tableName where user_id='$uid'");
while ($row=mysql_fetch_object($sql)){




echo json_encode($data);


echo json_encode(false);




Team Leader Answered on March 14, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.