How to create JSON using data from MySQL database
JSON
(JavaScript Object Notation) is more preferred nowadays over XML as
it’s lightweight, readable and easily manageable for exchanging
data across various platforms.
we’ll see how JSON
Data can be created from Employee table stored in MySQL database.
1. Create Employee table in MySQL database.
Create PHP file to read MySQL table and create JSON.get_json.php
DONE
*************************************************************************
More Advance
*************************************************************************
More Advance
If you want to create a API which Provide data on pass parameter then you can use following code:
The following code used in for parameter pass for geting data in json format
http://localhost/test_more_advance.php?no=10