I wrote a script using jQuery and AJAX today, and I get some errors...
The script:
function changeAdmin(id) {
$(document).ready(function() {
$(\'#ta
It could be an issue with missmatching PHP associative/numeric arrays and Javascript objects.
Try this:
$data = new Array();
$data['test'][] = "Row 1";
$data['test'][] = "Row 2";
echo json_encode($json, JSON_FORCE_OBJECT);
This should force json encoder to always encode to objects instead of numeric arrays and may solve the problem.