$response[] = array('ok' => true, 'name' => 'yellow', 'ok' => false, 'name' => 'red');
echo json_encode($response);
index.php
$(function() {
var arr = new Array();
$.get("combotest.php", function(i, data){
arr = data;
alert(data.msg);
}, "json");
});
But it continues to give me = "undifined".

New Topic/Question
Reply



MultiQuote


|