0
我必須發送整數數組和字符串值與PHP的Ajax。 如何做到這一點,以及如何獲得這些值在PHP端?ajax後整數數組和字符串
// values to be send
var nums = [1,2,3,4];
var method = "delete";
$.ajax({
url: "ajaxcalls.php",
type: "GET",
dataType: "json",
data: ???,
contentType: 'application/json; charset=utf-8',
});
// ajaxcalls.php
<?php
???
?>