having a bit of an issue with sending a jQuery array to a PHP file. I've looked at similar questions on here, but mine has other elements to the data variable being sent. Here's the code:
var data = 'type='+e+'&offset=' + all_dates_offset + '&filters=' + filters;
$.ajax({
url: "pos_jobs.php",
type: "POST",
cache: false,
data:data,
dataType:"json",
success: function(html){
//Do Something
}
});
For the data, 'e' and 'all_dates_offset' are standard variables, whereas 'filters' is an array. On the PHP side of things, I was hoping I could just use something like $_POST['filters'][0], but that is returning a null value.
Any ideas?
Thanks.