I have an AJAX call in the following format:
$.get('/controller/method/',
{
parameter1: value1,
parameter2: value2
},
function(data) {
if (data) {
}
else {
}
});
Is it possible to pass an array as a parameter?
parameter3: new Array(1, 2, 3)
parameter4: new Array('one' => 1, 'two' => 2, 'three' => 3)
You will probably need to name your variable as “parameter3[]” for PHP’s sake:
$_GET[“parameter3”] will appear in PHP as