PHP: $result = mysql_query("SELECT * FROM events LIMIT 15");
Can anyone help and show me how create json that looks exactly like the one below from the php query above?
{
"events": [
{
"id": 2,
"name": "TIME",
"image": "http://127.0.0.1/android_tests_json_and_xml/images/time_best.jpg",
"status": "30 years of Cirque du Soleil's best photos",
"profilePic": "http://127.0.0.1/android_tests_json_and_xml/images/time.png",
"timeStamp": "1403375851930",
"url": "http://ti.me/1qW8MLB"
},
{
"id": 3,
"name": "Discovery",
"image": "http://127.0.0.1/images/discovery_mos.jpg",
"status": "A team of Austrian scientists has developed a laser system that causes fruit flies to dance.",
"profilePic": "http://127.0.0.1/android_tests_json_and_xml/images/discovery.jpg",
"timeStamp": "1403375851930",
"url": "http://dsc.tv/xmMxD"
},
{
"id": 11,
"name": "A. R. rahman",
"image": "http://127.0.0.1/images/ar_bw.jpg",
"status": "",
"profilePic": "http://127.0.0.1/android_tests_json_and_xml/images/ar.jpg",
"timeStamp": "1403375851930",
"url": ""
}
]
}
I'd really appreciate it