I am sending array via ajax to PHP. How to get the array from PHP?
$('.send-image').on('click', function() {
$.ajax({
type:"POST",
url:"sendimages.php",
data: {
images: imgArr
},
success: function(data) {
console.log(data);
},
error: function(e) {
console.log(e);
}
});
});
I tried with this, but its not working
$images = $_POST['imgArr'];
foreach($images as $d) {
echo $d;
}