{
"0":"108","id":"108",
"1":"2010-03-09 17:12:43","date_submitted":"2010-03-09 17:12:43",
"2":"1","event_desc":"1",
"3":"2010-03-09","event_date":"2010-03-09"
}
index.php:
$.getJSON("select.php", function(data) {
$.each(data.results, function(i, item){
$("#print").append('<h2>' + item.text + '</h2>');
});
});
<div id="print"></div>
This is not working for me. I'm not sure what I'm doing wrong here or if this is even the right way to do it? Do you need to use a .json file when using .getJSON? I simply want to print data from my select.php file that has an json encoded array. If there is a more simple way to do this without using json encode please let me know.
Much appreciation!!!
Thank you!