I am sending an array to php script using an Ajax call, but I am not able to access that array in php.
Here is my code:
seats = ["s4","s6","s9","s24"];
sendBookedSeats(seats);
function sendBookedSeats(seats){
console.log(seats);
$.ajax({
type: "POST",
url: "index.php",
data: {
'seats' : seats,
}
})
}
How do I access the array seats in my php script?
var_dump($_POST);inindex.php?index.php?