I have a jQuery post that returns some objects.
So, I have a DB query result that I do json_encode($result)
and then I send it as a response in the success
function inside the jQuery post.
If I console.log the response I see multiple objects. What I want is to send the response as an array of arrays.
In PHP
json_encode($results)
In javascript:
success: function(json) {
console.log(json);
}
In console log:
[>Object , >Object , >Object]
Any ideas?